Jump to content
  • Advertisement
Sign in to follow this  
harveypekar

Questions about multiple viewports

This topic is 2687 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

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
Advertisement

Can anyone tell me what the standard way of doing this would be?

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
Thanks, I got it working with multiple contexts now. I ended up writing my custom Opengl widget for Qt, because it doesn't really allow easy sharing with external contexts.

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!