Doubt in working with multi context application.

Started by
4 comments, last by Tsumuji 17 years, 5 months ago
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?
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.
hum, very good, but and in glX?
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
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!
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.

This topic is closed to new replies.

Advertisement