PDA

View Full Version : Viewports with different background colors



clintCJM
10-09-2006, 12:44 PM
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?

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

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

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