Detecting OpenGL hardware support

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

Detecting OpenGL hardware support

gsxruk
Hi All,

Could anyone advise if it's possible to detect if the hardware supports OpenGL at runtime?

I was reading some information on the OpenGL site that suggested you should just attempt to create a context.  If it fails, you can safely assume OpenGL is not supported.  However, this does not seem to be the case with JOGL (unless I'm doing something wrong).

I have found that if you execute GLProfile.initSingleton(boolean) on a machine that does not support OpenGL, the JVM is just terminated.  The same happens if you attempt to obtain the default profile.  Would you not expect a GLException to be thrown instead?

Thanks.
Reply | Threaded
Open this post in threaded view
|

Re: Detecting OpenGL hardware support

gsxruk
Hi All,

Don't worry about this.  Had a quick think and then realised this could be overcome using another thread.

Thanks.