Hi,
Can someone tell me what the status of Jogl support for OpenGL 4 is at the moment? There is a GL4 interface already for some time, but (on my OpenGL4 capable system), the following fails: GL4 gl = drawable.getGL().getGL4(); Message: Exception in thread "AWT-EventQueue-0" javax.media.opengl.GLException: Not a GL4 implementation at jogamp.opengl.gl4.GL4bcImpl.getGL4(GL4bcImpl.java:32456) A similar line GL3 gl = drawable.getGL().getGL3() works fine; in that case, gl.glGetString(GL3.GL_VERSION); returns OGL version 3.3 A tool like GPU Caps Viewer reports OGL 4.1, and it does run the OGL4 tesselation demo fine. System: Jogl build: b391 NVidia GTX 460, driver: 270.61(whql), Win7 64 bits Any ideas? Job |
Hi
I thing not, that jogl is the problem. Your driver must support that. Test your opengl driver version. E.g. in one from your init methods : public void init( GLAutoDrawable glDrawable ) { GL2 gl = glDrawable.getGL().getGL2(); // with your logger Log.getLogger().info(" GL_VERSION: " + gl.glGetString(GL2.GL_VERSION) ); // or make a simple System.out.println(" GL_VERSION: "+ gl.glGetString(GL2.GL_VERSION) ); ........... You must see in your log file or console an output with 4.0 or 4.1 If not, you must update your drivers. Strange, i have also 270.61(whql) and i have an older card.Double GTX295 (What is exact OGL 3.3) It seems you have not the correct driver from nvidea selected. |
Hi,
Thanks, yes that is what I did, with glDrawable.getGL().getGL3() rather than glDrawable.getGL().getGL2(). The version reported by gl.glGetString(GL3.GL_VERSION) is 3.3, rather than 4.1 The problem with this is that the NVidia driver itself definitely supports OpenGL 4.1. It is the latest (whql) driver, the NVidia documentation says they support OGL 4.1. And an independent tool, GPU Caps viewer, actually runs a little demo using OpenGL 4 features. What goes wrong is that, apparently, the Jogl systems does not recognize the OGL 4 capabilities, and the question is why. |
Ok , another option is, to test it with a shader.
Take in a shader script a double matrix (dmat4 or DOUBLE_mat4). If this works, you have OGL 4.0 or 4.1 |
In reply to this post by Job Zwiers
Stop,wait, back. I see the problem.
I have take a little look at nvidea. Nvidea want's support OGL 4.0 in the near future, but no driver can support it in the moment. 3.3 is the absolute maxima. What you see in Windows 7 is a promotion gag. Not more. You can see it, when you load the drive's description for it's flagship, the GTX 580. 3.3 is the end in the moment |
In reply to this post by Worker
Well, in order to do that I do need an GL4 context, or else I cannot send double precision attributes or uniforms to the shader. And when I try to create that GL4 context, the applications crashes upon initialization. Actually, I did test the shader language version by including a #version 410 line within the shader code. That line is accepted for my system with a GTX 460, and it is rejected for an older system with a GTX 8800. Which is correct: the 8000 series, 9000 series, and 200 series accept #version330, because they are limited to OpenGL 3.3. The 400 (and 500) series can manage OpenGL 4.1 And my card/driver combination can handle OpenGL 4, since it can run (non-Jogl) demos that use such OGL 4 features, like for instance tesselation shaders. By the way, that your driver version seems to be the same is correct: Nvidia has this "unified driver" approach, which means that at least all consumer desktop cards from the last few years use the same driver. |
Read the document at
http://www.nvidia.de/object/win7-winvista-64bit-270.61-whql-driver-de.html At the end you can see, what OGL version is submitted. |
In reply to this post by Worker
Why do you think that? The NVidia pages state that they support OGL 4.1 for almost a year by now. The product description also say so, the driver descriptions say so. But the real test is of course a "running" OGL4 application. And I do have a few demos, written in C/C++ I guess. One of them is built into the very useful GPU Caps viewer program, which informs you about the OpenGL related capabilities of your hardware and driver. (http://www.ozone3d.net/gpu_caps_viewer/) It says for my system that OGL 4.1 is enabled, and moreover it runs the OGL4 specific tesselation shader demo. Another OGL4.0 demo that I can run is the "Mountains demo" (http://rastergrid.com/blog/downloads/mountains-demo/) All of that runs on a GTX 460, and I am sure it will run on a GTX 580, if you can afford one of those.. |
In reply to this post by Worker
That document (http://www.nvidia.de/object/win7-winvista-64bit-270.61-whql-driver-de.html) is a little misleading, since it refers to the unified driver, to be used for a lot of cards, and most of these (except for the 400 and 500 series) do not support OGL 4. But if you visit the english version: http://www.nvidia.com/object/win7-winvista-64bit-270.61-whql-driver.html then it says explicitly: •Supports OpenGL 4.1 on GeForce 400 series and later GPUs." |
In reply to this post by Job Zwiers
It's sad. I have in the moment not the right GPU for OGL 4.1,
so i can't make an instant test. My card ends at 3.3. Have you test it with calls 'dmat4' ? |
In reply to this post by Job Zwiers
On 05/21/2011 05:08 PM, Job Zwiers [via jogamp] wrote:
> Hi, > > Can someone tell me what the status of Jogl support for OpenGL 4 is at > the moment? > There is a GL4 interface already for some time, but (on my OpenGL4 > capable system), the following fails: > > GL4 gl = drawable.getGL().getGL4(); > > Message: Exception in thread "AWT-EventQueue-0" > javax.media.opengl.GLException: Not a GL4 implementation > at jogamp.opengl.gl4.GL4bcImpl.getGL4(GL4bcImpl.java:32456) > > A similar line GL3 gl = drawable.getGL().getGL3() works fine; > in that case, gl.glGetString(GL3.GL_VERSION); returns OGL version 3.3 > > A tool like GPU Caps Viewer reports OGL 4.1, and it does run the OGL4 > tesselation demo fine. > > System: > Jogl build: b391 > NVidia GTX 460, driver: 270.61(whql), Win7 64 bits > > Any ideas? > > Job did you request the GL4 profile*? GLProfile profile = GLProfile.get(GLProfile.GL4); //configure context GLCapabilities capabilities = new GLCapabilities(profile); ... //initialize a GLDrawable of your choice GLCanvas canvas = new GLCanvas(capabilities); *old blog entry about profiles: http://michael-bien.com/mbien/entry/jogl_2_opengl_profiles_explained best regards, michael -- - - - - http://michael-bien.com |
Hi,
Yes, your pages are very useful. But I think that my simple test is much like your examples, except that I went for OGL4, rather than OGL3. (And with GL3 instead of GL4 everything works fine) The relevant code sections: private GLCanvas createGLCanvas() { GLProfile glp = GLProfile.get(GLProfile.GL4); GLCapabilities caps = new GLCapabilities(glp); GLCanvas canvas = new GLCanvas(caps); canvas.addGLEventListener(this); .... public void init(GLAutoDrawable drawable) { GL4 gl = drawable.getGL().getGL4(); // <=============== THIS LINE THROWS THE EXCEPTION String version = gl.glGetString(GL4.GL_VERSION); String shaderversion = gl.glGetString(GL4.GL_SHADING_LANGUAGE_VERSION); System.out.println("GLVERSION: " + version + " shading language: " + shaderversion ); ..... The result: java] Exception in thread "AWT-EventQueue-0" javax.media.opengl.GLException: Not a GL4 implementation [java] at jogamp.opengl.gl4.GL4bcImpl.getGL4(GL4bcImpl.java:32456) [java] at firstopengl.OGL4Test.init(OGL4Test.java:173) [java] at jogamp.opengl.GLDrawableHelper.init(GLDrawableHelper.java:132) [java] at jogamp.opengl.GLDrawableHelper.init(GLDrawableHelper.java:151) [java] at javax.media.opengl.awt.GLCanvas$InitAction.run(GLCanvas.java:872) [java] at jogamp.opengl.GLDrawableHelper.invokeGL(GLDrawableHelper.java:328) [java] at javax.media.opengl.awt.GLCanvas.maybeDoSingleThreadedWorkaround(GLCanvas.java:785) [java] at javax.media.opengl.awt.GLCanvas.display(GLCanvas.java:389) [java] at javax.media.opengl.awt.GLCanvas.paint(GLCanvas.java:488) [java] at sun.awt.RepaintArea.paintComponent(RepaintArea.java:248) Best regards, Job |
ok so you did it right. looks like a bug to me. If you explicitly
request GL4 you should get it or it should fail much earlier.
the funny part is actually that it is a GL4bc implementation (see the stack trace). So it should be GL4 with fixed function functionality (backwards compatibility). for a workaround you can just cast it down: GL4 gl = (GL4)drawable.getGL(); (btw context.toString() should give you lots of output which is quite useful for debugging). i can't test it right now myself. best regards, michael On 05/22/2011 12:37 AM, Job Zwiers [via jogamp] wrote: Hi, -- - - - - http://michael-bien.com |
Ok, thank's Michael, that workaround seems to work. I do get a GL4 context, and glGetString(GL.GL_VERSION) now correctly reports version 4.1 Still I have a question: it seems that specific OGL4.0/OGL4.1 features are already present in Jogl GL3. I also see from the Javadoc that GL4 does not introduce new constants or new methods, although OpenGL 4.0/4.1 of course does add a few things on top of OpenGL 3.3. So what's the philosophy behind the GL4 interface? Is it just a "tagging interface" ? Best regards, Job Zwiers |
Administrator
|
In reply to this post by Job Zwiers
On Saturday, May 21, 2011 05:08:40 pm Job Zwiers [via jogamp] wrote:
> > Hi, > > Can someone tell me what the status of Jogl support for OpenGL 4 is at the > moment? OpenGL 4.1 is fully supported JOGL choses the highes available fixed function pipeline available, ie 4.1, 4.0, 3.3, .. 2.0 .. 1.5 - or the highes programmable only one. Hence the following unit test shall show you the highest profile, ie 4.1 if available on your platform http://jogamp.org/git/?p=jogl.git;a=blob;f=src/test/com/jogamp/opengl/test/junit/jogl/acore/TestGLProfile01NEWT.java;h=89833760281d02a249e4c0564930c2dc66b23f46;hb=HEAD#l68 https://jogamp.org/chuck/job/jogl/lastSuccessfulBuild/label=linux-x86_64-amd/testReport/com.jogamp.opengl.test.junit.jogl.acore/TestGLProfile01NEWT/test01GLProfileDefault/? https://jogamp.org/chuck/job/jogl/lastSuccessfulBuild/label=win7-x86_64-nvida/testReport/com.jogamp.opengl.test.junit.jogl.acore/TestGLProfile01NEWT/test01GLProfileDefault/? Using a GPU/driver w/o OpenGL 4* support, here OpenGL 3.3 only, appears as: https://jogamp.org/chuck/job/jogl/lastSuccessfulBuild/label=linux-x86_64-nvidia/testReport/com.jogamp.opengl.test.junit.jogl.acore/TestGLProfile01NEWT/test01GLProfileDefault/? Have a look at those unit tests. Sure you can also try a forced a GLProfile, however, not all are available on all machines, naturally. ~Sven > There is a GL4 interface already for some time, but (on my OpenGL4 capable > system), the following fails: > > GL4 gl = drawable.getGL().getGL4(); > > Message: Exception in thread "AWT-EventQueue-0" > javax.media.opengl.GLException: Not a GL4 implementation > at jogamp.opengl.gl4.GL4bcImpl.getGL4(GL4bcImpl.java:32456) > > A similar line GL3 gl = drawable.getGL().getGL3() works fine; > in that case, gl.glGetString(GL3.GL_VERSION); returns OGL version 3.3 > > A tool like GPU Caps Viewer reports OGL 4.1, and it does run the OGL4 > tesselation demo fine. > > System: > Jogl build: b391 > NVidia GTX 460, driver: 270.61(whql), Win7 64 bits > > Any ideas? > > Job > > _______________________________________________ > If you reply to this email, your message will be added to the discussion below: > http://forum.jogamp.org/OpenGL-4-status-tp2969055p2969055.html > To start a new topic under jogl, email [hidden email] > To unsubscribe from jogl, visit |
Administrator
|
In reply to this post by Job Zwiers
On Sunday, May 22, 2011 01:46:09 pm Job Zwiers [via jogamp] wrote:
> > Ok, thank's Michael, that workaround seems to work. I do get a GL4 > context, > and glGetString(GL.GL_VERSION) now correctly reports version 4.1 > > Still I have a question: it seems that specific OGL4.0/OGL4.1 features are > already present in Jogl GL3. > I also see from the Javadoc that GL4 does not introduce new constants or new > methods, > although OpenGL 4.0/4.1 of course does add a few things on top of OpenGL > 3.3. All GL 4.0/4.1 features are part of GL3* as extensions, hence they are subsumed. If you request a 3.* profile, or your default highest one is a 2.* profile, you would need to query for the availability of the extensions exceeding the 3.* spec. > > So what's the philosophy behind the GL4 interface? Is it just a "tagging > interface" ? Sort of, it guarantess that you have full GL4 support. The GL profile selection is mainly done in the context creation, where we request a specific profile. ~Sven |
Free forum by Nabble | Edit this page |