Hi,
One of our customers is getting the following exception: javax.media.opengl.GLException: Not a GL2 implementation at jogamp.opengl.gl4.GL4bcImpl.getGL2(GL4bcImpl.java:37127) ..... In the init method: public void init(final GLAutoDrawable drawable) { GL2 gl = drawable.getGL().getGL2(); // <--- this fails. ... } The GLProfile profile was created using: GLProfile glp = GLProfile.getDefault(); final GLCapabilities caps = new GLCapabilities(glp); ... The customer is using Linux (Ubuntu 12.04 LTS) together with an NVidia NVS 4200M running driver version 331.20. Our code is using JOGL 2.0.2 final (2.0-b1061-20130720). Our code has been tested internally on more than 30 configurations (Mac/Linux/Windows with different graphics cards), including an NVidia NVS 5200M on Linux, and several different NVS 4200M's on Windows (but with different driver versions), and I have not seen this issue before. Any help would be greatly appreciated! Regards, Mikael. |
Administrator
|
Hi
Please use the very latest version first. If this bug is still reproducible, then report it. I already used a very similar hardware under Fedora without such troubles. Keep in mind that it could be caused by a driver bug and using GLProfile.getDefault() is not a very good idea if you want a backward compatible profile "everywhere".
Julien Gouesse | Personal blog | Website
|
Hi, and thanks for answering.
I don't have direct access to the customers machine, and have not seen the error on our own machines. So I'd first ask to hear if anybody has experienced this as well. How should I create the profile, if not using GLProfile.getDefault(), while ensuring i get something with the GL2 interface? The code has run on many different configurations (including very similar hardware and os), and I have never seen this before. And shouldn't GL4bcImpl be able to return a GL2 interface? |
This post was updated on .
2013-12-13 13:45, mikaelhc [via jogamp] skrev:
> Hi, and thanks for answering. > > I don't have direct access to the customers machine, and have not seen the error on our own machines. So I'd first ask to hear if anybody has experienced this as well. > > How should I create the profile, if not using GLProfile.getDefault(), while ensuring i get something with the GL2 interface? Use GLProfile.get(GLProfile.GL2) to make sure you get an profile that fully support the GL2 interface. https://jogamp.org/deployment/jogamp-next/javadoc/jogl/javadoc/javax/media/opengl/GL2.html Note that some functionality of GL2 is deprecated using OpenGL 3 core and removed when using OpenGL 4 thus if you want your code to work on the most amounts of devices then target the GL2ES2 interface that only include common functionality across OpenGL 2, OpenGL ES 2 and OpenGL 3 core. GLProfile.get(GLProfile.GL2ES2) https://jogamp.org/deployment/jogamp-next/javadoc/jogl/javadoc/javax/media/opengl/GL2ES2.html > > The code has run on many different configurations (including very similar hardware and os), and I have never seen this before. And shouldn't GL4bcImpl be able to return a GL2 interface? Some recent OpenGL 4 drivers have stopped providing GL3bc and GL4bc backward compatible contexts thus full GL2 is no longer supported on all desktop systems. I would recommend you to target the GL2ES2 or the GL2GL3 interface in order to make your code compatible with both legacy GL2 drivers and more recent drivers that only provide GL3 and GL4 "core" contexts. http://jogamp.org/jogl/doc/Overview-OpenGL-Evolution-And-JOGL.html Cheers Xerxes |
Thanks for the quick answer.
I will look into that. I have kept away from the GL2ES2 interface, because I assumed it was meant for OpenGL ES devices. I guess I'll have to look more into the details of profile creations. I did manage to reproduce this problem on a coworkers laptop, though. It seems that JOGL 2.0.2 and the Nvidia Linux 331.20 drivers do not work together (at least not the way I create the profile). If I either upgrade to JOGL 2.1.2 or downgrade to Nvidia drivers 319.32 the problem is resolved. Regards, Mikael. |
Administrator
|
In reply to this post by Xerxes Rånby
Thank you very much for the feedback. Please Xerxes, do you have any reference about this change? I know it happens under Mac, does it happen under other operating systems?
Julien Gouesse | Personal blog | Website
|
<quote author="gouessej">
I don't think there is a problem on Mac? I can see that the newer OpenGL 3 & 4 profiles are 'core' only, and thus not backwards compatible, but all of their graphics cards seem to support a 'legacy' OpenGL 2.1 context as well (which seems to be the one I get using the getDefault() profile): https://developer.apple.com/graphicsimaging/opengl/capabilities/index.html If you know of any drivers where it is not possible to obtain an OpenGL 2.1 context, I'd like to know as well. Btw, currently our OpenGL code is a mixture of fixed-function pipeline code, and programmable shaders. If I should move to something more future proof, like the GL2ES2 interface, I'd loose the matrix stack operations (glFrustum, glMultMatrix, ...). Are there any easy-to-use Java libraries for providing similar functionality, that works together with JOGL? |
Administrator
|
Use JOGL itself, look at PMVMatrix. I use it in Ardor3D :)
Julien Gouesse | Personal blog | Website
|
Excellent! Just what I needed. |
Free forum by Nabble | Edit this page |