From: Lloyd D. <ll...@ga...> - 2003-03-18 08:38:24
|
Hi ! I suspect that's more a "feature" than a bug ... However here a few suggestion: 0. there is no attached image 1. why not draw to the bitmap (there is an example in <csgl>/example/cs) and show it in a picture box, than the other way round ? 2. Refresh() will force immediate redraw, and Invalidate() ask for a redraw (later in the event loop) ----- Original Message ----- From: "Aron Ernvik" <ar...@se...> To: "CsGL users list" <csg...@li...> Sent: Tuesday, March 18, 2003 7:23 PM Subject: [Csgl-users] obscured control and context.ToImage() > 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 > > > > ------------------------------------------------------- > This SF.net email is sponsored by:Crypto Challenge is now open! > Get cracking and register here for some mind boggling fun and > the chance of winning an Apple iPod: > http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0031en > _______________________________________________ > Csgl-users mailing list > Csg...@li... > https://lists.sourceforge.net/lists/listinfo/csgl-users |