Shaded Background using OpenGL

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.

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…