Hello everyone,
I am having strange problems when using jogl in the following scenario:
Windows 2000
Java sdk 1.4.1_01
Nvidia Quadro FX 500 128 meg adapter
The application has a single GLCanvas which is positioned inside a JPanel using a Border Layout. The GLCanvas is in the CENTER. A toolbar is in the NORTH and a status bar is in the SOUTH. The JPanel with its 3 parts is inside a JFrame.
Here is the code fragment that sets these up.
/*
* Now that all the members have default values, create the
* toolbar, canvas and status bars and add them to the panel.
* This has to come last because the toolbar queries the
* members of this panel to fill in defaults for its dialogs.
*/
setLayout (new BorderLayout());
setMinimumSize (new Dimension (2, 2));
/*
* Create a J3DToolBar and put it in the NORTH position.
*/
toolBar = new J3DToolBar (this);
add (BorderLayout.NORTH, toolBar);
/*
* Create a GLCanvas and put it in the CENTER position.
*/
GLCapabilities c = new GLCapabilities ();
canvas =
GLDrawableFactory.getFactory().createGLCanvas (c);
isDoubleBuffered = c.getDoubleBuffered ();
canvas.addGLEventListener (this);
add (BorderLayout.CENTER, canvas);
canvas.addMouseListener(mouse_listen);
canvas.addMouseWheelListener(wheel_listen);
canvas.addMouseMotionListener(mouse_listen);
/*
* Create a status bar and put it into the SOUTH position
*/
createStatusBar ();
add (BorderLayout.SOUTH, statusPanel);
When the JFrame is first shown, the 3D view is ok, but the toolbar and status bar will not be painted, or be only partially painted. On subsequent interaction with the 3D canvas (picking, redrawing, etc.) then the toolbar and status bar will sometimes be repainted and sometimes be erased. I do not use my own paintComponent method in either the toolbar or status bar. I rely on the underlying swing behavior.
In addition, other frames in the application will often not be repainted when they are exposed or otherwise made “dirty”. In the case of one frame, which is a 2D drawing frame, I have my own paintComponent method which I have verified is being called and working correctly. This
2D frame will draw an image to the graphics2d, but the image never shows up. I have tried the drawing both with and without double buffering and the problem exists on both.
I run the same application on other systems, using other graphics cards, and these problems do not occur. The two computers we have that run the Nvidia quadro 500 both show the problems. Java applications that do not use any
jogl do not show the problems.
I am guessing that somehow the quadro 500, in combination with jogl, are interfering with the normal swing painting mechanism.
Any comments or observations are very welcome.
Thank you,
Glenn Pinkerton