PDA

View Full Version : Multiple viewports



DeXtr0
09-04-2004, 11:11 AM
Hi All,

Does anybody know if it's possible to define multiple viewports in 1 application ?

I want to show different stuff in different parts of the screen.

I defined another viewport but all the things that were visible in my first viewport are getting cleared :(

Thanks for helping me out already,
DeXtr0

chowe6685
09-04-2004, 12:05 PM
http://nehe.gamedev.net/data/lessons/lesson.asp?lesson=42

-NiCo-
09-04-2004, 12:06 PM
The clear command clears the whole framebuffer, it's not restricted to the current viewport.

To clear a part of your window, just draw a quad and set the front color to your desired clearcolor.

Nico

chowe6685
09-04-2004, 12:12 PM
you can also use glscissor to restrict the area affected by glclear

DeXtr0
09-05-2004, 02:22 AM
Thanks all,

the glscissor function was the most effective one for me.

Regards,
DeXtr0