Jump to content
  • Advertisement
Sign in to follow this  
Tsumuji

OpenGL Doubt in working with multi context application.

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

Is possible pass the textures generated in one OpenGL context to another? I have tried here and was sucessfull in creating a multi context in separate threads application. So, I have 2 windows running in parallel each one with own openGL context. And is working. But I want to know if it is possible to pass texturess generated by thread 2, to thread 1, so I can exibit textures loaded from thread 2 in thread 1?

Share this post


Link to post
Share on other sites
Advertisement
Assuming that you're using Windows, you'll need to use wglShareLists on the two opengl resource contexts involved to be able to share things like textures between them.

Share this post


Link to post
Share on other sites
Quote:
Original post by Tsumuji
hum, very good, but and in glX?


I unfortunately don't have any experience with glX, but after a little searching, it appears that the list sharing functionality happens in glXCreateContext function where the third parameter specifies, I suppose, the context of your other window. I am, however, guessing. Good luck.

Reference for glXCreateContext

Share this post


Link to post
Share on other sites
Yeah, I discover that yesterday at night. You're right. You need ro pass the parameter at creatin time with glXCreateContext();
Thanks for the replies!

Share this post


Link to post
Share on other sites
one more doubt:
When I call wglShareLists, I pass the first parameter as my current context(the main context), and the second, the one I want to get the textures generated from?

I tried here, but get lost with the original image. Only the secondary context can be seen in screen now, not the main context.

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!