View Full Version : Viewports with different background colors

10-09-2006, 11:44 AM
I've got 2 viewports in my openGL window. I want each to have a different background color. I'm using glClearColorfv( m_fvClearColor ) to set the background color for each. Problem is, whatever I set viewport #2 background color to, that becomes the background color for the entire window (both viewports).

Any ideas?

10-09-2006, 12:03 PM
You need to use the scissor rectangle set around the second viewport to prevent the second clear from clearing entire window.

10-09-2006, 12:09 PM
I will try that. Thank you.

10-10-2006, 06:47 AM
Thanks Komat. Hope all is well in Prague. Sunny and warm here in Florida.