|
From: Aron E. <ar...@se...> - 2003-03-18 08:22:43
|
Hi all, I'm working on a volume rendering application where rendering a frame might take several seconds. Because of this, I cache the most recently rendered image as a bitmap (using context.ToImage()) and in OnPaint() I just draw this bitmap if it is still valid, instead of rendering the whole scene over. There seems to be a problem when the Control (which is not an OpenGLControl but a "standard" control containing a ControlGLContext) is obscured by another window - there will be rubbish in the obscured parts of the window. So when the front window is moved and my OnPaint() is called and I draw the bitmap, the part that was not visible before will contain errors. The two attached images illustrate what happens. In "bad.jpg", the lower part of the image was obscured by the Task Manager at rendering time. "good.jpg" shows what it should look like. Is there any way I can force the whole control to be redrawn, even if parts of it are not visible? Thanks for any help! Best regards Aron Ernvik |