PDA

View Full Version : How i can specify a Gradient background color rather than glClearColor() ???



merp
04-01-2002, 04:46 AM
Hi,

If any way to display a gradient color as the window background color ? rather than specifying a constant color using glClearColor().

Coconut
04-01-2002, 05:08 AM
I just did a search on words "gradient background" on this forum, and there were several hits returned.

LordKronos
04-01-2002, 05:10 AM
You can draw a full screen quad with no texture and use the vertex color to create the gradient. If you draw it at the far clipping plane and set the Z test to GL_ALWAYS, this will clear your z-buffer at the same time. However, it might be faster to disable depth testing for this poly and to separately do an explicit clear of the depth buffer.