How to redraw some objects while not redraw others?

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?

thanks!

student

Hi !

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

Mikael

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.