PDA

View Full Version : Drawing background gradient



esapir
03-14-2014, 12:57 PM
I would like to set the background with gradient instead of a single color. Is it possible ?

Cornix
03-14-2014, 12:58 PM
Draw a colored quad over the entire screen. There is no build in "clear to gradient" function.

esapir
03-14-2014, 01:00 PM
How i can draw a quad with screen coords?

Brokenmind
03-14-2014, 01:03 PM
You need to draw it before you do the transformation that affects the rest of the scene (so right after you load the identity matrix). Then, the screen space goes from (-1, -1) to (1, 1),