J. Baker wrote:... returns OpenGL version 1.3 here on XP and 2.1 on Snow Leopard. Looks like this returns what your graphics card can currently handle and not PureBasic's OpenGL version. I would guess PureBasic is still using 1.2+ like Fred had said a while back?
On the same hw ? I mean are you using the MacBook Air 2010 from your signature and you get 2.1 on OSX and 1.3 on XP ?
Because in this case you can probably just update your Windows drivers.
Again if it's the same card, what card is it exactly ? Just curious.
About what glGetString_(#GL_VERSION) tells you:
#GL_VERSION returns the OpenGL version associated to the rendering context created by PB.
It's not necessarily the highest OpenGL version supported by the driver/card combination.
PB afaik asks for a legacy OpenGL RC, so you can have three different outcomes.
1) The driver does support only a legacy version of OpenGL up to 2.1 (maybe 1.4, maybe 1.2, maybe 2.0 ..., whatever)
The OpenGL version associated to the RC will be a version not higher than 2.1.
This is the case for older drivers before the introduction of OpenGL 3.0+
2) The driver does support a core profile (OpenGL 3.0+) and ALSO a compatibility profile.
The OpenGL version associated to the RC will be a version > 2.1 up to the highest version for which a compatibility profile is available (starting from 3.2 where the compatibility profile was introduced, there is a hole before that).
So even if PB is asking for a legacy OpenGL RC, you end up with a version like 3.2 or 4.4 or whatever. And you can actually use some modern functions while still following the legacy OpenGL programming style. You can mix legacy with new.
This is what typically happens with modern drivers from the major vendors (nVidia, AMD, Intel) under Windows and very often under Linux.
3) The driver does support a core profile (OpenGL 3.0+) but NOT a compatibility profile.
The OpenGL version associated to the RC will be a version up to 2.1, should be 2.1 in fact.
This is what happens under OSX, where Apple decided to not support a compatibility profile and the highest OpenGL versions are available only when requesting a core profile.
And yes, the returned string with the OpenGL version does not tell you what PB requires/use, just what OpenGL version is available to it (and to you) after the RC creation.
So this does not answer flaith's question
