openGL pipeline

I am a newb with JOGL and have been creating several different applications to test some features of the JOGL API. One of the features I am testing is using a GLJPanel over a GLCanvas. My problem is that whenever I enable the java2d/opengl pipeline, the application locks up. Thinking that the problem was with my code, I ran the example found on wikipedia and chris campbell’s demo (http://weblogs.java.net/blog/campbell/archive/2006/10/index.html) with both the pipeline enabled/disabled. The end result is the same. Whenever I use a GLJPanel for the drawable and the pipeline is enabled the application freezes…at random times. Sometimes the app will run fine for a minute and the next it’ll freeze up. I assumed it was possibly an old driver but I updated my driver and the problem persists.

Has anyone experienced this same issue? Anyone know how I can fix this? I would like to be able to enable the pipeline so I can see firsthand the speed of a GLJPanel vs. GLCanvas.

My comp has:
3.0 ghz P4 cpu
1.0 GB ram
nvidia geforce fx 5950 ultra using driver version: 93.71

Thankx.

I am having kind of the same problem except ANY application stops repainting when I enable the OpenGL pipeline. When using a GLJPanel, the JOGL rendering stops as well.

I have noticed that things are fine until the window has been fully initialised, i.e. the taskbar button has been created, etc. Buttons repaint fine, the JOGL panel repaints, then everything just stops.

If I’m using the default L&F, the frame repaints properly on resizes, but none of the contents do. If I use a custom L&F, such as substance, the entire frame and contents stop repainting.

Everything works fine if I don’t use “-Dsun.java2d.noddraw=true -Dsun.java.opengl=True”.

I only noticed this after I updated to the latest version of 1.6 (1.6 b105 I think, I’m not at my dev machine). At the same time I also updated my video card drivers so like Pandaemonium I don’t think it’s a driver issue.

I also have the same problem with the Photo Cube demo from Chris Campbell’s blog. Pipeline disabled works perfectly, pipeline enabled just stops repainting.

Cheers,
Brett

I recall hearing from Chris Campbell that there were some unfortunate regressions in the current version of NVidia’s drivers which affected the Java 2D OpenGL pipeline. Try -Dsun.java2d.opengl.fbobject=false . Does that work?

With the following flags set for both of my small test programs, things worked perfectly with the OpenGL pipeline enabled:

-Dsun.java2d.opengl.fbobject=false -Dsun.java2d.noddraw=True -Dsun.java2d.opengl=True

(Edit - System specs)
AMD Athlon 64 3200+
XP Pro SP2
GeForce 6800 GT (AGP 8X) 128MB
Video BIOS: 5.40.02.16
ForceWare version: 93.71

The larger of my test apps places swing components on top of a GLJPanel. It repaints/responds properly with the fboobject flag set even when using the Substance L&F.

Here is my smaller test app which doesn’t include any JOGL but still has problems when not using the fboobject flag:


import java.awt.GridLayout;
import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.UIManager;
import javax.swing.UnsupportedLookAndFeelException;
//import org.jvnet.substance.SubstanceLookAndFeel;
//import org.jvnet.substance.painter.SpecularGradientPainter;
//import org.jvnet.substance.theme.SubstanceBottleGreenTheme;

public class TestApp
{
    JFrame frame = null;
    
    public TestApp()
    {
//        try
//        {
//            UIManager.setLookAndFeel(new SubstanceLookAndFeel());
//            SubstanceLookAndFeel.setCurrentGradientPainter( new SpecularGradientPainter() );
//            SubstanceLookAndFeel.setCurrentTheme( 
//                    new SubstanceBottleGreenTheme()
//            );
//            
//            JFrame.setDefaultLookAndFeelDecorated( true );
//        } 
//        catch( UnsupportedLookAndFeelException ex )
//        {
//            ex.printStackTrace();
//        }

        frame = new JFrame( "Test" );
        frame.setDefaultCloseOperation( JFrame.EXIT_ON_CLOSE );
        frame.setSize( 500, 500 );
        
        frame.add( createButtonPanel( 8, 8 ) );
        
        frame.setVisible( true );
    }
    
    private JPanel createButtonPanel( int rows, int cols )
    {
        JPanel btnCanvas = new JPanel( new GridLayout( rows, cols ) );
        btnCanvas.setOpaque( false );
        JButton b = null;
        for( int i = 0; i < (rows*cols); i++ )
        {
            b = new JButton( "test" + i );
            btnCanvas.add( b );
        }
        return btnCanvas;
    }

    public static void main(String[] args)
    {
        new TestApp();
    }   
}

Sweet, thanks Ken. I’ll try using the -Dsun.java2d.opengl.fbobject=false when I get home from work tonight. If I have any further problems I’ll definately post my experience.