Hi,
In my application the OpenGLContext must stay active all the time, so I cannot detach or pause it while the app is running.
To avoid detaching when switching views, I created something like an “OpenGLContext holder” (a component that manages the position of the OpenGLContext). The holder replaced the OpenGLContext in the hierarchy, and the actual OpenGLContext is now a child of the root component.When the OpenGLContext is not needed, I move it outside of the visible area by setting its bounds (setBounds(-1000, -1000, ...)).
The problem is that, for a short time after switching views, the elements inside the OpenGLContext are rendered at the wrong scale before the correct rendering appears.
Does anyone have an idea how to solve the wrong scaling issue, or maybe suggest a better approach than using an OpenGLContext holder?
Thanks in advance for your help!
