Hello there,
in a small application I’m working on, there are a lot of objects that are tied to a certain OpenGL context (i.e. they rely on textures and OpenGL state previously established on this particular context). While the docs clearly state that it is unsafe to cache GL
-objects, I just wanted to ask whether this also applies to GLContext
-objects.
Is it safe to store a reference to a specific GLContext
in order to make it current or to check whether the current context is the right one for a specific object? If an OpenGL context is re-created because of the removal of a GLCanvas
from it’s containment hierarchy, will the GLContext
-reference returned by GLCanvas.getContext()
be the same (==) as it was before the removal?
Thanks in advance for your answers.
Best regards,
Ingomar