nOOb: Hardware/driver information


I've taken a quick search of the javadoc and the forums but can't answer this one. Is there a way to get the information about graphics driver/hardware etc at startup/runtime?



Not as part of jME that I know of.  (We detect and use GL capabilities in our lwjgl specific classes, but that does not identify card/driver specifically.)  If lwjgl contains such a feature we could support it though.

LWJGL has getAdapter and getVersion methods on the Display class that get the information from the GL layer. 'Real GL' uses getString and JOGL exposes this method. So does LWJGL :).



Ok, added getAdapter and getDriverVersion to the DisplaySystem class in cvs.


Now that's service :slight_smile:


get adapter returns nv4_disp which I think is just the dll name. getDriverVersion is very useful though. glGetString can get more useful information, the 3 I'm thinking of are GL_VENDOR, GL_RENDERER and GL_VERSION as these give things like

Vendor: "NVIDIA Corporation", renderer: "GeForce FX Go5650/AGP/SSE2", version: "2.0.3"

which are very useful when looking at issues, knowing the exact card and opengl version supported could come in very handy.

I've added 3 new methods to obtain the data and updated BasicSimpleGame to dump the details.

The only draw back is that the new methods calling glGetString can only return useful information after the display has been created. So i've moved the debug line down in BasicSimpleGame to just after the display is created.

Here is a patch if you are interested. Feel free to change things to fit in to the JME style if you feel it's needed.


Cool, thanks. However, these calls can probably be put into DisplaySystem (which can also return "Information Not Available" or similar if called too soon).


I thought that being GL calls they belonged in the LWJGLDisplaySystem, but personally, I don't know enough of the internals of JME architecture to object to them being moved :slight_smile:

I'll keep an aye out for the CVS commit so I can stop using my own fork :slight_smile:


The gl call itself will be in LWJGLDisplaySystem, yes. But the DisplaySystem will have the getVender(), getRenderer(), getVersion() method definitions.

It does :slight_smile:

The dummy display system used in the tests has been updated to add the methods too as they are abstract in the the DisplaySystem class


6 vs half dozen…

The information or the implementation?

added this locally, will be in cvs during next check-in (sometime this week).