I’m fairly new to JOGL so be lenient…I have started a project where I’m using the GLJPanel() for my main panel (vs the GLCanvas) because of the Swing interaction that I need. I use the init() method to load textures and to load 3DS models. Everything works great in that basic state until I resize the window…the code calls init() every time the window is resized. In some instances this just forces a reread of my textures and models and for the textures that is no problem but for the models it causes the window not to repaint at all.
I realize that on resizing the reshape() function gets called in OpenGL and I’ve coded in OpenGL where I loaded textures in my init() function (yes they were globally defined and not local copies) and everything worked fine. I could resize the OpenGL window and init() would not appear to be called again, but for some reason I’m getting the init() to be called for every resize. I know I’m doing something wrong. I know if I switch to GLCanvas() then I don’t see init() being called again so what is the issue with the GLJPanel() and init().
I think what I would really like to find is some example code for how to setup the GLJPanel() with loading textures and then I could go from there…any suggestions?