Why does SetupRC( ) come before RenderScene?
Shouldn’t SetupRC( ) come before since it sets the glClearColor? How does glClear(GL_COLOR_BUFFER_BIT); know what color to clear with if it goes before SetupRC( )?
// Called to draw scene
// Clear the window with current clearing color
// Flush drawing commands glFlush(); }
// Setup the rendering state
glClearColor(0.0f, 0.0f, 1.0f, 1.0f);
// Main program entry point
glutInitDisplayMode(GLUT_SINGLE | GLUT_RGB);
SetupRC(); glutMainLoop(); }
I’d appreciate any response to this message.