Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
![]() ![]() ![]() ![]() ![]() ![]() ![]() |
43 posts
|
Hi, I'm looking for a fast check to determine which maximum openGL version is available before anything else happens.
The current solution I'm using is to create a PBuffer and get the available opengl from it. It takes about a second to complete on a fast machine, which seems rather steep to determine a hardware specification. Looking forward to your thoughts on such a check. |
Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
![]() ![]() ![]() ![]() ![]() ![]() ![]() |
Administrator
2933 posts
|
On 02/07/2012 04:21 PM, karelknoes [via jogamp] wrote:
> > > Hi, I'm looking for a fast check to determine which maximum openGL version is > available before anything else happens. > > The current solution I'm using is to create a PBuffer and get the available > opengl from it. It takes about a second to complete on a fast machine, which > seems rather steep to determine a hardware specification. > > Looking forward to your thoughts on such a check. > check the static profile function in GLProfile .. I guess you will find something useful there. ~Sven |
Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
![]() ![]() ![]() ![]() ![]() ![]() ![]() |
43 posts
|
Thanks very much for the fast reply! The static profile functions seem to be excellent for a coarse version check.
It does seem though that a more detailed check, e.g. minimally opengl version 1.5, is not available. Am I overlooking something? |
Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
![]() ![]() ![]() ![]() ![]() ![]() ![]() |
Administrator
6043 posts
|
Hi
Use gl.glGetString(GL.GL_VERSION) to get the exact supported version.
Julien Gouesse | Personal blog | Website
|
Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
![]() ![]() ![]() ![]() ![]() ![]() ![]() |
Administrator
2933 posts
|
In reply to this post by karelknoes
On 02/07/2012 04:51 PM, karelknoes [via jogamp] wrote:
> > > Thanks very much for the fast reply! The static profile functions seem to be > excellent for a coarse version check. > > It does seem though that a more detailed check, e.g. minimally opengl > version 1.5, is not available. Am I overlooking something? > According to our GL profile mapping <http://jogamp.org/jogl/doc/bouml/html-svg/fig128069.svg> we only pick the highest available for each profile. The other generic GLProfile selections (MaxProgrammable, Default, ..) are cross profiles (eg. MaxProgrammable returns GL4 if [GL2, GLES2, GL3, GL4] is avail. Picking a lower OpenGL version number IMHO makes no sense. ~Sven |
Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
![]() ![]() ![]() ![]() ![]() ![]() ![]() |
43 posts
|
gouessej. I'm currently indeed using gl.glGetString(GL.GL_VERSION). The downside of this approach seems to be that I first need to create the glContext, which takes about a second.
Sven, let's say that only GL2 is available. Would I be able to tell from this profile which specific (sub)version is available? Namely, we require at least version 1.5. |
Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
![]() ![]() ![]() ![]() ![]() ![]() ![]() |
Administrator
2933 posts
|
On 02/07/2012 05:17 PM, karelknoes [via jogamp] wrote:
> > > gouessej. I'm currently indeed using gl.glGetString(GL.GL_VERSION). The > downside of this approach seems to be that I first need to create the > glContext, which takes about a second. > > Sven, let's say that only GL2 is available. Would I be able to tell from > this profile which specific (sub)version is available? Namely, we require at > least version 1.5. Nope, not really. The actual GLContext has some query methods: public final int getGLVersionMajor() public final int getGLVersionMinor() public final boolean isGLCompatibilityProfile() public final boolean isGLForwardCompatible() public final boolean isGLDebugEnabled() public final boolean isCreatedWithARBMethod() You can also test availability of extensions via: [GLContext/GL] boolean isExtensionAvailable(String) and functions (not so reliable): [GLContext/GL] boolean isFunctionAvailable(String) ~Sven |
Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
![]() ![]() ![]() ![]() ![]() ![]() ![]() |
43 posts
|
All right, good to know that I don't need to look further. Thanks a lot of the help :).
|
Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
![]() ![]() ![]() ![]() ![]() ![]() ![]() |
Administrator
6043 posts
|
You're welcome. There is no cross-platform way to know which minor version is supported before the creation of the context as far as I know. I understand your position, I still support OpenGL 1.2 in some programs (TUER alpha version).
Julien Gouesse | Personal blog | Website
|
Free forum by Nabble | Edit this page |