LWJGL Forum

Programming => Lightweight Java Gaming Library => Topic started by: baegsi on January 26, 2005, 20:09:44

Title: How to determine if a proper OpenGL driver is available
Post by: baegsi on January 26, 2005, 20:09:44
Is it possbile to programmatically determine if a proper OpenGL driver is installed? How could I do that?
Title: How to determine if a proper OpenGL driver is available
Post by: Skippy0 on January 26, 2005, 21:51:42

     GL11.glGetString(GL11.GL_VENDOR);
     GL11.glGetString(GL11.GL_VERSION);
     GL11.glGetString(GL11.GL_RENDERER);


Or check the extension-string.

If this is not what you want, define "proper drievr".
Title: How to determine if a proper OpenGL driver is available
Post by: princec on January 26, 2005, 21:59:09
LWJGL won't even create a display if you've not got proper a hardware ICD installed. (Except if you force it to with a system property)

Cas :)
Title: How to determine if a proper OpenGL driver is available
Post by: baegsi on January 26, 2005, 22:01:17
No, I mean how do I determine if my game will run on your machine? When I can retrieve vendor, version info etc I already know that it is going to run, don't I? My problem is that I need to tackle installations where no / or only a dated driver is available on the current machine and I have to prompt "please update your driver" or do other actions.
Title: How to determine if a proper OpenGL driver is available
Post by: baegsi on January 26, 2005, 22:02:55
Quote from: "princec"LWJGL won't even create a display if you've not got proper a hardware ICD installed. (Except if you force it to with a system property)

Cas :)
Exactly. How can I check this before creating a display?
Title: How to determine if a proper OpenGL driver is available
Post by: princec on January 26, 2005, 23:28:27
Well, if you set the property before creating the display it'll load up the Microsoft generic GDI renderer if there's no hardware drivers and you can then check the gl version and renderer strings.

However it's probably a waste of time even getting that far. I suggest you simply attempt to create the Display and if it fails and you can't get any other mode to suit you you can put up some kind of dialog or open a webpage.

Cas :)
Title: How to determine if a proper OpenGL driver is available
Post by: baegsi on January 27, 2005, 18:17:46
Quote from: "princec"Well, if you set the property before creating the display it'll load up the Microsoft generic GDI renderer if there's no hardware drivers and you can then check the gl version and renderer strings.
Which property do you mean?
Title: How to determine if a proper OpenGL driver is available
Post by: princec on January 27, 2005, 19:41:18
org.lwjgl.opengl.Window.allowSoftwareOpenGL

(we ought to change the name to Display here I suppose)

Cas :)
Title: How to determine if a proper OpenGL driver is available
Post by: elias on January 27, 2005, 21:23:17
Quote from: "princec"org.lwjgl.opengl.Window.allowSoftwareOpenGL

(we ought to change the name to Display here I suppose)

Cas :)

Done.

- elias