My problem is when i am trying to change the background color in run time, i want to call the display function two times to made the color change.I am using Opengl with MFC.For color selection i used the standard windows color dialog.I am getting the correct values from the color dialog and the that same values in the glClearcolor() function’s arguments also.But i need to call the display function two times.The function call is given below:-
glClear( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT );
What is the problem ? How i can solve this ? If any buffer clearing problem ?
Thanks for any input,