GLJPanel, JOGL 1.1 b12

Hi Ken,

may I kindly ask you to review this post because it regards behaviour of JOGL-1.1-beta12.

I have tested my application under java versions 1.5.0-b64 and 1.6.0-ea-b34:


java version "1.5.0"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0-b64)
Java HotSpot(TM) Client VM (build 1.5.0-b64, mixed mode, sharing)

java version "1.6.0-ea"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.6.0-ea-b34)
Java HotSpot(TM) Client VM (build 1.6.0-ea-b34, mixed mode, sharing)

As far as JOGL version is concerned I have tested my application with JOGL versions 1.1-beta11 and 1.1-beta12. The best results I receive is with combination of JOGL-1.1-beta11 and java 1.6.0-ea-b34.

Please let me explain my testing procedure. With JFileChooser I select a model which I want to see in GLJPanel object. If I use JOGL beta11 then under 1.5.0-b64 I see some flickering (problems with “gray rectangles”) but generally I could say that application works. As I’ve already said the best results I receive is with java version 1.6.0-ea-b34: no gray rectangles, smooth operation.

But if I use the latest JOGL 1.1 beta12 then I have some problems:

  1. Under 1.5.0-b64 I could see only part of the model that means only part that was under JFileChooser object. The other part of the GLJPanel object is gray. If I want to see the whole 3D model I have to click inside of GLJPanel object.

  2. I test my application also under 1.6.0-ea-b34. After I open my model with JFileChooser and put it into GLJPanel I see nothing - only gray rectangle. If I click inside this object it doesn’t help. Actually, my object doesn’t respond. I assume that constructor for my model has not run yet. I’ve found out that if want to see my 3D model then I have to move the JInternalFrame and at this time my model appears correctly inside internal frame.

Could it be that there is something wrong with my application? Should I redesign it? What has changed between beta11 and beta12? I hope you’ll find my report usefull. Please, let me know if you need any other information to resolve this problem.

Best regards,
Andrei

Are you running on Windows? If so, are you passing the command line option -Dsun.java2d.noddraw=true to Java? That option is currently required for correct operation of the GLJPanel, as it disables Java2D’s DirectDraw acceleration which is incompatible with OpenGL.

A couple of possibilities. First, check your application to make sure that once your window is visible that you only make modifications to it (like adding a GLJPanel) using SwingUtilities.invokeAndWait() and SwingUtilities.invokeLater(). Second, check your application to make sure you aren’t trying to call OpenGL outside of your GLEventListener’s callbacks; that is the only time the OpenGL context is valid in JOGL’s programming model. Third, if you have multithreading going on in your application, check to make sure you have appropriate synchronization between the threads.

If you’ve checked all of these things and are still having problems, please open a bug using the JOGL Issue Tracker (you’ll need to be an Observer of the project to do so) and attach your code as a test case.

Hi Ken,

thank you very much for your quick reponce. Let me answer to your questions:

Are you running on Windows?
Yes. Windows XP SP1

If so, are you passing the command line option -Dsun.java2d.noddraw=true to Java?
When I prepared previous report I didn’t use the option you propose. Today I have retested my application with this option and I can say that the aplication behaves the same under both java versions.

As far as other your proposals are concerned I’ll try to put together simple test application to reproduce the error. I’ll keep you informed.

Best regards,
Andrei