[solved] can't create GL3 and GL4 context

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

[solved] can't create GL3 and GL4 context

DoS
This post was updated on .
can't create GL3 and GL4 context
i've just downloaded latest JOGL version from JOGAMP.org (amd64 windows)

GLProfile profile = GLProfile.get(GLProfile.GL4);
and
GLProfile profile = GLProfile.get(GLProfile.GL3);
throws the following error:

Exception in thread "main" javax.media.opengl.GLException: Profile GL4 is not available on null, but: [GLProfile[GL2ES2/GL2], GLProfile[GL2ES1/GL2], GLProfile[GL2/GL2], GLProfile[GL2/GL2], GLProfile[GL2GL3/GL2]]
        at javax.media.opengl.GLProfile.get(GLProfile.java:655)
        at javax.media.opengl.GLProfile.get(GLProfile.java:668)
        at de.schabby.jogl.helloworld.HelloWorld.main(HelloWorld.java:16)

GLProfile profile = GLProfile.get(GLProfile.GL2); <- works

added jogl.all.jar and gluegen-rt.jar to my project, anything else missing?

System: XPS15 Laptop, i7, 8GB DDR3 Ram, Nvidia gt540m graphics card with latest drivers

EDIT:
as described here: http://jogamp.org/wiki/index.php/Downloading_and_installing_JOGL
i also tried to use the latest builds, didn't work
Reply | Threaded
Open this post in threaded view
|

Re: can't create GL3 and GL4 context

gouessej
Administrator
Hi

You need the JARs containing the native libraries for your OS and your architecture (jogl-all-natives-windows-amd64.jar and gluegen-rt-natives-windows-amd64.jar), you have to put them into the same directory than jogl.all.jar and gluegen-rt.jar, you don't need to set the Java Library Path. The class path should contain only the 2 first JARs.
Julien Gouesse | Personal blog | Website
DoS
Reply | Threaded
Open this post in threaded view
|

Re: can't create GL3 and GL4 context

DoS
jogl-all-natives-windows-amd64.jar is in same folder with jogl.all.jar
and
gluegen-rt-natives-windows-amd64.jar is in same folder with gluegen-rt.jar

which one do i have to add to class path? the amd64 ones or the jar's without?
Reply | Threaded
Open this post in threaded view
|

Re: can't create GL3 and GL4 context

gouessej
Administrator
The class path should point to classes, not to native libraries... Therefore, put jogl.all.jar and gluegen-rt.jar into the class path.
Julien Gouesse | Personal blog | Website
DoS
Reply | Threaded
Open this post in threaded view
|

Re: can't create GL3 and GL4 context

DoS
yeah, thanks, thought so .. but there's still the same problem, only GL2 works
Reply | Threaded
Open this post in threaded view
|

Re: can't create GL3 and GL4 context

gouessej
Administrator
Use GLProfile.getMaxFixedFunc() to get the best profile for fixed functions, rather use GLProfile.getMaxProgrammable() to get the best forward compatible profile. Please avoid explicitly requesting GL4 or GL3.
Julien Gouesse | Personal blog | Website
DoS
Reply | Threaded
Open this post in threaded view
|

Re: can't create GL3 and GL4 context

DoS
returns:
GLProfile.getMaxFixedFunc() -> GLProfile[GL2/GL2]
GLProfile.getMaxProgrammable() -> GLProfile[GL2/GL2]

my question is why?.. i have a opengl 4 capable graphics card.. shouldn't that work then?
Reply | Threaded
Open this post in threaded view
|

Re: can't create GL3 and GL4 context

gouessej
Administrator
There is something wrong. I'm almost sure your graphics card supports forward compatible profile. However, when you create a real context, it will use GL4bc (OpenGL 4, backward compatible), it means that you can access to all functions available in OpenGL 4. Don't worry. Please indicate the exact number version of your driver even though you say it is the latest one.
Julien Gouesse | Personal blog | Website
DoS
Reply | Threaded
Open this post in threaded view
|

Re: can't create GL3 and GL4 context

DoS
http://imageshack.us/photo/my-images/269/unbenannteyo.png/

GL4bc and GL3bc ... there is one difference: GL4 and GL3 said "is not available on null"
Exception in thread "main" javax.media.opengl.GLException: Profile GL4bc is not available on WindowsGraphicsDevice[type Windows, connection decon, unitID 0, handle 0x0], but: [GLProfile[GL2ES2/GL2], GLProfile[GL2ES1/GL2], GLProfile[GL2/GL2], GLProfile[GL2/GL2], GLProfile[GL2GL3/GL2]]
        at javax.media.opengl.GLProfile.get(GLProfile.java:655)
        at javax.media.opengl.GLProfile.get(GLProfile.java:668)
        at de.schabby.jogl.helloworld.HelloWorld.main(HelloWorld.java:21)

Driver:
285.62 WHQL from Nvidia Website
windows device manager says version is: 8.17.12.8538
Reply | Threaded
Open this post in threaded view
|

Re: can't create GL3 and GL4 context

gouessej
Administrator
Ok, please fill a bug report
Julien Gouesse | Personal blog | Website
Reply | Threaded
Open this post in threaded view
|

Re: can't create GL3 and GL4 context

gouessej
Administrator
In reply to this post by DoS
This might be useful to fill a bug report about JOGL:
http://jogamp.org/wiki/index.php/Jogl_FAQ#Bugreports_.26_Testing

Some users have similar problems but did not spend any time in giving us a small test case to reproduce this bug. Please provide us a simple code snippet allowing to reproduce this bug.
Julien Gouesse | Personal blog | Website
Reply | Threaded
Open this post in threaded view
|

Re: can't create GL3 and GL4 context

Sven Gothel
Administrator
In reply to this post by gouessej
On Thursday, December 22, 2011 08:13:23 PM gouessej [via jogamp] wrote:
>
> Ok, please fill a bug report

Can you pls run etc\test.bat and etc\test_dbg.bat
and attach the log files to your new bugreport ?

Both will hopefully tell us why no GL3/GL4 is available.

Thank you.

http://jogamp.org/wiki/index.php/Jogamp_Versioning_and_Releases#Runtime_Version_Check

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

Re: can't create GL3 and GL4 context

Sven Gothel
Administrator
In reply to this post by gouessej
On Thursday, December 22, 2011 08:25:00 PM gouessej [via jogamp] wrote:
>
> This might be useful to fill a bug report about JOGL:
> http://jogamp.org/wiki/index.php/Jogl_FAQ#Bugreports_.26_Testing
> http://jogamp.org/wiki/index.php/Jogl_FAQ#Bugreports_.26_Testing 
>
> Some users have similar problems but did not spend any time in giving us a
> small test case to reproduce this bug. Please provide us a simple code
> snippet allowing to reproduce this bug.

IMHO in regards to a 'false' lack GL4/GL4 availability
the test_dbg script should be sufficient, since it logs
all GL profile scan results of our initialization sequence.

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

Re: can't create GL3 and GL4 context

DoS
https://jogamp.org/bugzilla/show_bug.cgi?id=543

here is my bug report, hope i did it the right way^^
need some strong coffee now :D
Reply | Threaded
Open this post in threaded view
|

Re: can't create GL3 and GL4 context

Sven Gothel
Administrator
On Thursday, December 22, 2011 09:17:59 PM DoS [via jogamp] wrote:
>
> https://jogamp.org/bugzilla/show_bug.cgi?id=543
>
> here is my bug report, hope i did it the right way^^

The bug report is great, thank you.
[Don't know why you renamed the test.log and test_dbg.log files though :]

https://jogamp.org/bugzilla/show_bug.cgi?id=543#c1
+++

I assume the confusion is that instead of using the Nvidia GT540M GPU,
you have used the Intel build-in GPU, see below.

I don't know how you switch over to the powerful GPU .. well.

+++

The Intel driver you use is capable of OpenGL 3.0 only:
  GL_VENDOR     Intel
  GL_VERSION    3.0.0 - Build 8.15.10.2342

JOGL maps OpenGL 3.0 to GL2:
  GL2 true[3.0 (compatibility profile, any, new)]

The GLVersion JOGL dumps is explained in detail here:
<http://jogamp.org/deployment/jogamp-next/javadoc/jogl/javadoc/javax/media/opengl/GLContext.html#getGLVersion%28%29>

The OpenGL inclusion criteria and why OpenGL 3.0 is 'only' GL2
is described here:
<http://jogamp.org/deployment/jogamp-next/javadoc/jogl/javadoc/overview-summary.html#GLAPIInclusionCriteria>

In short, the GL3 Profile 'world' actually start with OpenGL 3.1,
see OpenGL 3.0 as premature release which didn't introduce the new native
ARB Context semantics etc.

So, it's not a bug - it's a feature.

+++
DoS
Reply | Threaded
Open this post in threaded view
|

Re: can't create GL3 and GL4 context

DoS
just wow, you'r giving GREAT support!

[Don't know why you renamed the test.log and test_dbg.log files though :] -> piped it in console to a outputfile^^ didn't know it generates .log files itself :D

ohhh my second GPU (blush) that indeed makes sence - thank you!!

To use my real Graphics card, i just have to start eclipse with the right graphics prozessor
-> everything working now :)
Reply | Threaded
Open this post in threaded view
|

Re: can't create GL3 and GL4 context

gouessej
Administrator
Your bug report is interesting as some other people have similar problems. Thank you so much.
Julien Gouesse | Personal blog | Website
Reply | Threaded
Open this post in threaded view
|

Re: can't create GL3 and GL4 context

Jorge Andrade
In reply to this post by Sven Gothel
Great Support dude
had been hacking my brain trying to figure it out, had even considered changing my whole project to use GL3
turns out the IDE was using the intel graphics card instead of the nvidia( this optimus tecnology from nvidia is the worst!)
Thanks for the support mate