LWJGL Forum

Programming => OpenGL => Topic started by: michael.nischt on October 13, 2010, 13:39:19

Title: Graphics Card Vendor & Type
Post by: michael.nischt on October 13, 2010, 13:39:19
Hi all,

Is there a way to query the GPU vendor and type using the LWJGL?

My problem are IntelHD graphics chips. The ContextCapabilities say these support ARBVertexArrayObject and ARBFramebufferObject. However, vertex arrays have rendering problems and even a single use of glGenerateMipMaps results in less than 1fps.

Basically, I don't want to use the extensions if the graphics chip is from Intel.


Cheers,
Michael
Title: Re: Graphics Card Vendor & Type
Post by: princec on October 13, 2010, 14:28:58
We have a best-effort in the Display.getAdapter() and Display.getVersion() methods. If you've initialised the Display as well you can get the OpenGL vendor etc. using normal OpenGL queries. Snippet of my code for this:

String glvendor = GL11.glGetString(GL11.GL_VENDOR);
String glrenderer = GL11.glGetString(GL11.GL_RENDERER);
String glversion = GL11.glGetString(GL11.GL_VERSION);
String gldriver = null;
int i = glversion.indexOf(' ');
if (i != -1) {
gldriver = glversion.substring(i + 1);
glversion = glversion.substring(0, i);
}


Cas :)
Title: Re: Graphics Card Vendor & Type
Post by: michael.nischt on October 13, 2010, 15:36:19
thanks a lot! that's exactly what I was looking for.
(and how obvious.. now I feel ashamed to have bothered)

Title: Re: Graphics Card Vendor & Type
Post by: bobjob on October 14, 2010, 18:11:56
Thats a neat bit of code.

While on the topic of hardware vendors, can anyone please list problems with each vendor, things to watch out for.

currently from the forum threads I have gathered that DisplayLists are the way to go with Intel cards.
and VBO's are the way with S3.

any other variations need noting/correcting?
Title: Re: Graphics Card Vendor & Type
Post by: basil on October 14, 2010, 21:29:18
yes, matrox g400 works even worse than S3.

cas, thats pretty nice. does the space split always give driver + version ?
Title: Re: Graphics Card Vendor & Type
Post by: princec on October 14, 2010, 23:14:48
Display lists should probably be avoided at all costs anywhere. VBOs are the right way to do things. Immediate mode is right out. 99% of cards out there seem to be handling VBOs ok for me.

That code seems to work reliably to get driver + version.

Cas :)