Hi all,
on my GUI several InternalFrames,panels etc. are placed. To one of these Frames
I’ve added the GLCanvas in order to draw the 3d-scende there. So far everything works fine. But if I take this frame and move it over another component on my GUI the frame itself disappears behind the other component but it’s content,
the 3d-scene overlaps the other component, although it should disappear too!!! Am I doing something wrong?
Mixing lightweight and Heavyweight components
Unfortunately, the received wisdom from Sun in the case of putting heavyweight components (such as a GLCanvas) onto JInternalFrames can be summarised as “Don’t do it”.
But what should I use instead? I need to have more than one OpenGLWindows on my GUI!
The GLJPanel is currently your only option for 100% correct integration with JInternalFrames. Unfortunately it currently falls back to software rendering but user GKW on these forums is working on a pbuffer-based implementation which provides somewhat better performance as well as use of the latest driver features.
Another alternative would be to have an alternate mode of your application which uses multiple top-level windows instead of an MDI model.
We are working on better integration of the new OpenGL pipeline for Java2D present in 1.5 and JOGL. At JavaOne we showed a demo of the VertexProgRefract demo from the jogl-demos workspace running inside a JInternalFrame with proper occlusion by other lightweight widgets and with full hardware acceleration. This work is in very early stages though it is a concrete goal of both the Java2D and JOGL projects, so I would recommend one of the above options as a workaround.
ok…thx so far
+1000
That sounds superbly great!