Sign in to follow this  
harveypekar

Questions about multiple viewports

Recommended Posts

Hey everyone,

sorry about asking a question that should be clear from documentation, but right now I'm tired of banging my head against the wall.

Anyway, I'm implementing a GUi app that uses GL for multiple widgets, using windows but looking forward for crossplatform. I use QT, but decided to prototype further using my own widget as Qt borks as soon as I try to implement global resources (shaders et al) and right now, I'm just trying to understand what's going on.

From digging through the anecdotal evidence online, I realize I have two options:

Either use only one context (created on the main window handle) and call glViewport on rendering.
Or, use multiple contexts, and use wglShareLists to share shaders, textures, and VBO's.

I''m very unexperienced in GL, so I'm unable to judge the pro's and cons of either way. Can anyone tell me what the standard way of doing this would be?

Share this post


Link to post
Share on other sites
[quote name='harveypekar' timestamp='1302479645' post='4796853']
Can anyone tell me what the standard way of doing this would be?
[/quote]
1. Use glViewport to split the window.... or
2. Use wglShareLists to share VBO's etc between multiple contexts.

Use method 1 if you want more than one viewport within the same Qt control.
Use method 2 if you want each viewport in it's own window.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this