PDA

View Full Version : OpenGL and graphics card compatibility issues



Qu0ll
04-21-2009, 10:09 PM
My understanding is that OpenGL utilises the power of the graphics card's GPU but I have a few related questions:

1. Does this mean that the graphics card must be certified to be OpenGL compatible and that OpenGL will only run on a limited subset of graphics cards?
2. If a machine has on-board graphics for example, is it simply the case that OpenGL will not work on it?
3. Is it possible to programmatically detect whether the current graphics card supports OpenGL?

Thanks,

-Qu0ll

matchStickMan
04-21-2009, 11:31 PM
Hi Quoll,

Concerning your first question:
1. Yes your graphics card must say it supports OpenGL. But let me add that pretty much *all* graphics now support OpenGL these days. The issue they many openGL programmers face is not whether openGL is supported on a graphics card, but which *version* of openGL is supported. The most recent being openGL v2.1. [i'm ignoring version 3 cos driver support is sparse]

One nice software that I use to find out about openGL support of different graphics card is "OpenGL extension viewer". You can download it here:

http://www.realtech-vr.com/glview/


As for your second question:
2. You are wrong here. Most, if not all, onboard graphics card support openGL. On-board graphics chips, many of them based on Intel GMA series, have support ranging from openGL 1.4 all the way to openGL 2.1. I know this for a fact. :)

As for your last question:
3. That very simple. Simply try to create an openGL context. If it fails, well, that means you don't really have openGL support.

matchStickMan
04-21-2009, 11:38 PM
I forgot to add:

There's a neat utility called glewinfo.exe that you can download here:

http://glew.sourceforge.net/

Run the exe file and it will tell you up to which version of opengl your can can support and also what openGL extensions you can support.

Essentially there are openGL commands that are not attached to any particular version and you have to programatically query for their support before you use them on various graphics cards.


Finally do note that driver updates for your graphics card occasionally cause a jump in you openGL version support. :)

Stephen A
04-21-2009, 11:45 PM
Pretty much what matchStickMan said.

OpenGL 3.1 is the latest version, supported by the latest GPUs/IGPs of Ati and Nvidia (but not Intel).

OpenGL 2.1 is pretty much supported by every GPU/IGP released in the last 8 years from Ati and Nvidia, as well as the latest Intel IGPs.

Driver support is generally ok, as long as you don't target Intel IGPs and don't push the (graphics) envelope. If you plan to do any of that, you can look forward to multiple, GPU- and driver-specific rendering paths, workarounds for driver bugs and similar fun stuff.

Qu0ll
04-21-2009, 11:48 PM
Thanks very much matchStickMan for the prompt, comprehensive reply.

That has answered all my questions.

-Qu0ll

matchStickMan
04-22-2009, 03:08 AM
Always a pleasure to help out. :)