Jump to content
  • Advertisement
Sign in to follow this  
Silex

multiple viewports

This topic is 4873 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi, I've seen 2 ways of accomplishing nonlinear projection (scissoring and rendering to textures) and was wondering if anyone who's worked on something similar would care to share some pros and cons of each, or if they know of any different (better) method. I'm mainly after ease of implementation, but performance is also a consideration. Thanks [Edited by - Silex on June 20, 2005 12:35:16 PM]

Share this post


Link to post
Share on other sites
Advertisement
I simply use glViewport, that works with no scissoring (as far as I know)... I suppose it's not applicable to your case, so what are these multiple viewports for?

Share this post


Link to post
Share on other sites
My understanding was that scissoring was needed when you have viewports of irregular dimensions, meaning they each have their own projection matrices. This is however potentially completely wrong.

Share this post


Link to post
Share on other sites
Quote:
Original post by BladeWise
I simply use glViewport, that works with no scissoring (as far as I know)... I suppose it's not applicable to your case, so what are these multiple viewports for?

Caught my attention too, did a quick google search and it'd seem people might use scissor test in a loop:

for_each_viewport {
glViewport();
glScissor();
glClear();
draw()
}

but if you simply move the clear() call outside it works pretty well with no scissor

glClear();
for_each_viewport {
glViewport();
draw()
}

... then again, the Red Book does mention using scissor test and viewport parameters together when doing nonlinear projection. Hard to tell. For what's worth, viewport() alone worked for me so far :s

[edit]: searching some more, it turns out the scissor definition is precisely to guard from effect of 'operations like glClear()' which would otherwise ignore the viewport dimensions.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!