View Full Version : How to redraw some objects while not redraw others?

09-27-2002, 09:27 PM
I can redraw only some objects within the update region using InvalidateRect( LPCRECT lpRect, BOOL bErase = TRUE ).
But sometime I can't completely separate the objects based on region.For example, when I draw a hill, trees, and some snow,
I wish redraw snow with time, but it's not necessary to redraw the hill and trees.

How do I do?



09-27-2002, 10:09 PM
Hi !

With OpenGL you always have to redraw the entire window contents when some part of the window is invalidated.


09-28-2002, 08:25 AM
For the snowfall case, you can render the geometry to an offscreen buffer (back buffer or pbuffer) and blit to the screen to display it; then render the snow to the front buffer. Just don't write the depth buffer and you'll be fine.

However, in general, most interactive 3D applications re-render the entire scene each frame.