PDA

View Full Version : Colored Backround



Pip
04-02-2001, 10:17 PM
I would like to have a backround of one colour (simple) but I would like this colour (of backround) would be lighter in a side and darker on the other side.
Like the backround of solidworks, for example.
Do you know a simple way or a smart method to do that?

Relic
04-03-2001, 02:25 AM
Not really an advanced question, but here it goes.
Setup a gluOrtho2D projection with your window's client size, glLoadIdentity for the modelview matrix, disable depth test, stipple, lighting, blending, and other settings which manipulate the color, and draw a Gouraud shaded fullscreen quad (z=0)with the four vertices colored like you want the gradient to run.