PDA

View Full Version : GLException: Unable to select one of the provided



marce
08-20-2009, 11:29 AM
I am trying to start a JOGL application in a virtualized Linux system but I get this error when trying to compile:

Exception in thread "AWT-EventQueue-0" javax.media.opengl.GLException: Unable to select one of the provided GLCapabilities and the application wonīt work.

I have OpenGL support in my Linux system and I have tested other non-JOGL (but OpenGL) applications that work, so why donīt my JOGL app work?

ZbuffeR
08-21-2009, 01:20 AM
Unlikely to have such a java exception when "compiling", more likely to be when running.
I am not proficient with it but what are the GLCapabilities you ask for ?
Maybe some feature is not available, but the app request it.

What results do you get with this :

/sbin/lspci | grep VGA


And this :

glxinfo | grep OpenGL

?

marce
08-21-2009, 02:48 AM
I am not proficient with it but what are the GLCapabilities you ask for ?
Maybe some feature is not available, but the app request it.

Well, I donīt know what features that would be. I have also tested to just create a new simple opengl application using NetBeans opengl pack without changing the generated code and I still get the exception.

The GLJPanel is declared as this:

panel = new GLJPanel(createGLCapabilites());

And the createGLCapabilites() looks like this:

private GLCapabilities createGLCapabilites() {

GLCapabilities capabilities = new GLCapabilities();
capabilities.setHardwareAccelerated(true);

// try to enable 2x anti aliasing - should be supported on most hardware
capabilities.setNumSamples(2);
capabilities.setSampleBuffers(true);

return capabilities;
}



What results do you get with this :

/sbin/lspci | grep VGA


And this :

glxinfo | grep OpenGL

?

lspci | grep VGA gives:

$ lspci | grep VGA
00:02.0 VGA compatible controller: InnoTek Systemberatung GmbH VirtualBox Graphics Adapter

glxinfo | grep OpenGL gives:

$ glxinfo | grep OpenGL
OpenGL vendor string: Humper
OpenGL renderer string: Chromium
OpenGL version string: 2.0 Chromium 1.9
OpenGL shading language version string: 1.30
OpenGL extensions:

Any suggestions?

ZbuffeR
08-21-2009, 06:58 AM
try to remove all the set* from createGLCapabilites().
if it still does not work, you will have to be check what this chromium renderer can really provide, and build your GLCapabilities() according to it.