View Full Version : Shaded Background using OpenGL

10-16-2002, 02:19 AM
Hi All,

How can i draw shaded Background in OpenGL Window. I mean to set color for background we use glClearColor(red, green, blue, 0.f);
which can have only one fix color over full screen. so how can we have the shading on background?

this image has got fantstic background...
just have a look.

please help me...
thanks in advance.

10-16-2002, 03:50 AM
Hi !

Before you start rendering your image, switch to orthographics mode, disable depth writing and draw a quad with the colors you want, turn on depth writing and switch back to perspective mode and render your own stuff...