First let me preface the question by describing my application. I have a “main” application that spawns an openGL rendering window. Everything regarding this window is contained in a class I defined - call it COGLwin. It has its own message handler (and of course its own rendering context). The ultimate purpose of COGLwin is to use openGL as a means to do volume rendering via raycasting. Nevermind the details of volume rendering. The only thing is that it operates very similar to raytracing. As such I would like, as other raytracers do, render the scene scanline by scanline. My question is this: Say during the raycasting (raytracing) procedure I get a WM_PAINT message (e.g. minimize then maximize again) and a portion of what I have already rendered gets invalidated. Since volume rendering can be computationally intensive, I clearly do not want to render the entire scene again. An option is to store my progress (i.e. the pixels I’ve rendered already) in some buffer and, when I need to repaint, simply dump that buffer to the window. I’d prefer not to do this though because: (a) the datasets that need to be rendered can be huge and minimizing memory-usage is vital (must avoid paging the dataset if possible) ; (b) writing to the buffer is just more overhead.
Can anyone offer a better suggestion? Or does Windoze somehow “implicitly” perform this refresh for us?
Thanks. Sorry for the length of the post…
ks