Text archives Help
- From: Li-Ta Lo <
>
- To:
- Subject: [Manta] RTRT::resizeImages
- Date: Wed, 11 Feb 2009 18:02:26 -0700
- Organization: Los Alamos National Lab
Hi,
I think there is a minor bug in calling resizeImage() in
internalRenderLoop() that troubled me for a long time with
problems in window resizing in vtkManta.
resizeImage() is called at two places in the render loop.
The first one is at line 802
// P0 resize images for next frame
if(proc == 0)
resizeImages(animFrameState.frameSerialNumber);
I believe this one is to:
1. invalidate the image buffer for the frame to be rendered if
channel resolution is not changed.
2. delete and create a new image buffer with correct size for
the frame to be rendered.
and I have no problem with it. The second one is at line 886 and I
believe the value passed to resizeImage is wrong.
if(pipelineNeedsSetup){
// Negotiate the image pipeline for each channel
if(proc == 0){
setupPipelines(workersRendering == 0?1:workersRendering);
resizeImages(renderFrameState.frameSerialNumber);
}
I believe this one is to invalidate the image of previous rendered frame
that is now in wrong resolution. The value passed should be
renderFrameState.frameSerialNumber - 1 so that the image display will
skip this image.
long displayFrame = (renderFrameState.frameSerialNumber-1)%
channel->pipelineDepth;
Image* image = channel->images[displayFrame];
if(image && image->isValid()){
DisplayContext myContext(proc, workersAnimAndImage,
displayFrame, channel->pipelineDepth);
channel->display->displayImage(myContext, image);
}
Any idea?
Ollie
- [Manta] RTRT::resizeImages, Li-Ta Lo, 02/11/2009
Archive powered by MHonArc 2.6.16.