fade in screen
Draw scene. Disable depth testing. Enable alpha blending. Draw a white rectangle over the entire screen, with a steadily decreasing alpha value. Disable blending. Enable depth test. When the alpha value reaches 0, your scene is completely visible; you can then stop drawing the rectangle. If you want to fade out again, do the same with an increasing alpha value.
whoomp - there it is!
The only thing I would add is that it''s easier to draw the big white rectangle in 2D mode (glOrtho).
My city demo has code to combine 2D and 3D mode in the routine DoOrthoModeRendering(), I think there''s even code that draws a polygon commented out. Just wrap this with alpha blending as the other poster suggests and voila.
Hope this helps.
Love means nothing to a tennis player
The only thing I would add is that it''s easier to draw the big white rectangle in 2D mode (glOrtho).
My city demo has code to combine 2D and 3D mode in the routine DoOrthoModeRendering(), I think there''s even code that draws a polygon commented out. Just wrap this with alpha blending as the other poster suggests and voila.
Hope this helps.
Love means nothing to a tennis player
My nothing-to-write-home-about OpenGL webpage. (please pardon the popups!)
Love means nothing to a tennis player
My nothing-to-write-home-about OpenGL webpage. (please pardon the popups!)
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement