Posted by
rmnoon on
Aug 13, 2011; 12:16am
URL: https://forum.jogamp.org/GLJPanel-in-Lion-tp3250682.html
Hey,
We're using JOGL heavily integrated into a Swing app and it seems that the upgrade to Lion has caused glitchy behavior in GLJPanel, although GLCanvas is working fine.
Here're the screencaps.
This is GLCanvas and it's doing the right thing:

This is GLJPanel:

Here only a narrow strip of the graph is showing. Additionally, mouse events seem to happen upside down to the small piece of the graph I can see.
The interesting thing is that the white selection box shown is using the same mouse events and drawing with traditional client-side GL_QUADS. The nodes themselves are point sprites being drawn with a VBO and colored/blended via frag shader.
The error also seems to be exclusive to the newer AMD MacBook Pro model (I've tried it on the top-end one and the mid-range one). The last generation NVIDIA-based ones seem to work fine.
Any thoughts? I tried upgrading to the latest dev builds/native libs but the same problem happens there. Things are fine on Windows (although GLJPanel is WAY slower).
Thanks,
Ryan
Just in case, here's the code where I initialize either the panel or the canvas:
GLCapabilities capabilities = new GLCapabilities(profile);
renderer = new JOGLViewerRenderer();
handler = new JOGLInputHandler();
if (canvasType == CanvasType.CANVAS) {
glCanvas = new GLCanvas(capabilities);
glCanvas.addGLEventListener(renderer);
glCanvas.addKeyListener(handler);
glCanvas.addMouseListener(handler);
glCanvas.addMouseMotionListener(handler);
glCanvas.addMouseWheelListener(handler);
canvas = glCanvas;
} else {
glPanel = new GLJPanel(capabilities);
glPanel.addGLEventListener(renderer);
glPanel.addKeyListener(handler);
glPanel.addMouseListener(handler);
glPanel.addMouseMotionListener(handler);
glPanel.addMouseWheelListener(handler);
canvas = glPanel;
}