Multiple OpenGL canvas in Swing application

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Multiple OpenGL canvas in Swing application

juankprada
Hi, I am making a Swing application that will eventually have more than one OpenGL widget (canvas), each with different sizes. Is that even possible to show all of the openGL widgets at the same time?  each with its own FPSAnimator ?
Reply | Threaded
Open this post in threaded view
|

Re: Multiple OpenGL canvas in Swing application

gouessej
Administrator
Hi

You can do that but if you want them to share the same OpenGL resources, you'll have to use a shared context.
Julien Gouesse | Personal blog | Website
Reply | Threaded
Open this post in threaded view
|

Re: Multiple OpenGL canvas in Swing application

juankprada
That would be done with the context.makeCurrent() and context.release() methods right?. Seems like not that difficult to do.

thanks for the answer. Now I can proceed safetly
Reply | Threaded
Open this post in threaded view
|

Re: Multiple OpenGL canvas in Swing application

gouessej
Administrator