View Full Version : Changing the background color

09-12-2002, 04:58 PM
This is my first program in my graphics class. I have to create a window that changes color every time the 'c' key is struck.

I have everything I need, including the keyboard function (with switch). I have it working so that the program ends when the esc key is struck.

My problem is that I don't know how to actually change the color of the background. I'm supposed to use glClear in the keyboard function, but how?


09-12-2002, 10:36 PM
Have a look at glClearColor().