Login  Register

Exclusive Context Thread

Posted by elect on Apr 24, 2015; 7:01am
URL: https://forum.jogamp.org/Exclusive-Context-Thread-tp4034366.html

Hi,

I would like to understand more about the concept of "Exclusive Context Thread", I read this but I didnt the concept very well

Could someone please elaborate and explain better what this is?

Basically the idea to to dedicates the glcontext to the animator, right?

Reading here, it says:

"Abstraction for an OpenGL rendering context. In order to perform OpenGL rendering, a context must be "made current" on the current thread. OpenGL rendering semantics specify that only one context may be current on the current thread at any given time, and also that a given context may be current on only one thread at any given time. Because components can be added to and removed from the component hierarchy at any time, it is possible that the underlying OpenGL context may need to be destroyed and recreated multiple times over the lifetime of a given component. This process is handled by the implementation, and the GLContext abstraction provides a stable object which clients can use to refer to a given context."

So, in order to perform rendering, the thread animator needs the glContext to be made current.. right?

Now, according to sven, when he tested the nv driver, it was slow switching glContext... I dont understand, why it is being switched? And who is owning the glContext between these switches other then the animator?