JOGL Linux Hardware Acceleration

classic Classic list List threaded Threaded
12 messages Options
Reply | Threaded
Open this post in threaded view
|

JOGL Linux Hardware Acceleration

Stefan
I have downloaded JOGL and set it up in Eclipse and everything runs very slowly.

At first I thought it was because of the poor drivers for the Intel HD 3000 card, but intel_gpu_top shows the renderer is only 15% or so in use. If I run the webstart demos on the JOGL website, everything runs fine (the drivers are still quite bad, but the framerate is decent) and the renderer works at 97%.

Here is the output from running glxinfo, if it helps: http://pastebin.com/rkrC4R0D
Reply | Threaded
Open this post in threaded view
|

Re: JOGL Linux Hardware Acceleration

Wade Walker
Administrator
What exactly are you running in Eclipse? One of the JOGL unit tests? It's strange that would be worse than a webstart demo, since it's going through the same drivers either way.

However, I have heard that there are problems with Sandy Bridge graphics under Linux (see http://semiaccurate.com/2011/01/02/sandy-bridge-biggest-disapointment-year/). This could be a manifestation of that.
Reply | Threaded
Open this post in threaded view
|

Re: JOGL Linux Hardware Acceleration

Stefan
I am running some code I've written myself, but even a very basic scene with a teapot works very badly.
Reply | Threaded
Open this post in threaded view
|

Re: JOGL Linux Hardware Acceleration

Sven Gothel
Administrator
In reply to this post by Stefan
On Thursday, April 07, 2011 11:16:54 pm Stefan [via jogamp] wrote:
>
> I have downloaded JOGL and set it up in Eclipse and everything runs very
> slowly.

Are we alking about an SWT demo here, where you use the SWT GLCanvas ?
If so - this might be related to SWT's GLCanvas visual selection w/o hw accelleration ?
Do you know the drill ?

http://jogamp.org/wiki/index.php/Jogl_FAQ#Bugreports_.26_Testing

test.log and log file of the offending demo with debug props enabled - pls.

>
> At first I thought it was because of the poor drivers for the Intel HD 3000
> card, but intel_gpu_top shows the renderer is only 15% or so in use. If I
> run the webstart demos on the JOGL website, everything runs fine (the
> drivers are still quite bad, but the framerate is decent) and the renderer
> works at 97%.
>
> Here is the output from running glxinfo, if it helps:
> http://pastebin.com/rkrC4R0D

since this one works .. well :)

~Sven
Reply | Threaded
Open this post in threaded view
|

Re: JOGL Linux Hardware Acceleration

Stefan
I am not running any of the SWT demos, but rather a Swing application I've written. I will try to figure out how to get some sort of log from running it, but meanwhile, here is the output of test.sh: http://pastebin.com/8iNcRzaz
Reply | Threaded
Open this post in threaded view
|

Re: JOGL Linux Hardware Acceleration

gouessej
Administrator
Do you reproduce this problem with Sun's JDK? It should work with OpenJDK too. Can you provide a small test case?
Julien Gouesse | Personal blog | Website
Reply | Threaded
Open this post in threaded view
|

Re: JOGL Linux Hardware Acceleration

Stefan
Well, I tried to use the Gears demo that comes with JOGL, and it still runs very badly (as opposed to the Gears demo I download as a webstart application). This is my main method:

public static void main(String[] args) {
      GLProfile.initSingleton(false);
      GLProfile glp = GLProfile.getDefault();
     
      Gears gears = new Gears();
     
      GLCapabilities caps = new GLCapabilities(glp);
      GLJPanel panel = new GLJPanel(caps);
      panel.addGLEventListener(gears);
     
      FPSAnimator animator = new FPSAnimator(panel, 60);
     
      JFrame frame = new JFrame("Gears");
      frame.setIgnoreRepaint(true);
      frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
     
      animator.start();
      frame.add(panel);
      frame.setVisible(true);
      frame.setSize(512, 512);
}

This is the info I get from running this demo:

Gears: Init: AWT-GLJPanel[ jogamp.opengl.GLPbufferImpl]
Chosen GLCapabilities: GLCaps[0x95 0x6b: offscr, rgba 8/8/8/0, opaque, accum-rgba 0/0/0/0, dp/st/ms: 24/8/0, one, mono  , hw, GLProfile[GL2/GL2], pbuffer [r2t 0, r2tr 0, float 0]]
INIT GL IS: jogamp.opengl.gl4.GL4bcImpl
GL_VENDOR: Tungsten Graphics, Inc
GL_RENDERER: Mesa DRI Intel(R) Sandybridge Mobile  
GL_VERSION: 2.1 Mesa 7.10.2
gear1 list created: 1
gear2 list created: 2
gear3 list created: 3
Gears: Reshape 0/0 502x482
Gears: Reshape 0/0 508x487
Gears: Dispose
Gears: Init: AWT-GLJPanel[ jogamp.opengl.GLPbufferImpl]
Chosen GLCapabilities: GLCaps[0x95 0x6b: offscr, rgba 8/8/8/0, opaque, accum-rgba 0/0/0/0, dp/st/ms: 24/8/0, one, mono  , hw, GLProfile[GL2/GL2], pbuffer [r2t 0, r2tr 0, float 0]]
INIT GL IS: jogamp.opengl.gl4.GL4bcImpl
GL_VENDOR: Tungsten Graphics, Inc
GL_RENDERER: Mesa DRI Intel(R) Sandybridge Mobile  
GL_VERSION: 2.1 Mesa 7.10.2
gear1 list created: 1
gear2 list created: 2
gear3 list created: 3
Gears: Reshape 0/0 1280x775
Gears: Dispose
Reply | Threaded
Open this post in threaded view
|

Re: JOGL Linux Hardware Acceleration

gouessej
Administrator
You use the open source Mesa driver which is quite very slow and very young, your problem has nothing to do with JOGL. Other OpenGL applications should be slow too. I used Mesa with my previous graphics card; actually, the performances can be good when the driver is quite mature. Mesa 7.11 is noticeably faster on Intel HD 2000 and Intel HD 3000.
Julien Gouesse | Personal blog | Website
Reply | Threaded
Open this post in threaded view
|

Re: JOGL Linux Hardware Acceleration

Wade Walker
Administrator
In reply to this post by Stefan
You could try the X11 optimization trick:

static {
    GLProfile.initSingleton( true );
}

in your main class to see if that helps (instead of calling initSingleton(false) the way you're currently doing it). Your situation doesn't sound like a driver problem, because the Web Start version runs fine, and it's the same video driver being used for both Web Start and desktop JOGL.
Reply | Threaded
Open this post in threaded view
|

Re: JOGL Linux Hardware Acceleration

Stefan
Unfortunately, that doesn't do the trick. I will get the actual code of one of the webstart applications and see how it works.
Reply | Threaded
Open this post in threaded view
|

Re: JOGL Linux Hardware Acceleration

Stefan
Turns out the problem was using GLJPanel. I don't think the GLJPanel lacks hardware acceleration, because the processor was hardly in use. However, the GPU was hardly in use as well, so it might have some thread locking problems. GLCanvas seems to fix this problem.
Reply | Threaded
Open this post in threaded view
|

Re: JOGL Linux Hardware Acceleration

Wade Walker
Administrator
That makes sense -- GLJPanel is supposed to get better integration with Swing in certain situations, but at the cost of lower performance due to extra copying of the frame buffer to get compositing 100% correct.