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