I have an array of JPanels that are sequenced by button clicks onto a static area on the screen. One of the JPanels happens to be a GLJPanel with textures in the rendered scene. The textures are loaded only once in the constructor of the GLJPanel. When the GLJPanel is initially sequenced into view everything renders fine, but the next time it comes into view the textures are lost.
I have posted a sequence of views:
The initial view…
A button is clicked to cause the openGL window to be displayed…
Now the openGL window was hidden then accessed again for a second time…
Like I said before, the panels are not destroyed when not in view; they are kept in an array. My initial thought was to call updateSubImage(), but that did not seem to work.
Any thoughts?