OpenGL version?

Started by
8 comments, last by SimonForsman 11 years, 10 months ago
Hiya,

Coming from Direct3D, I decided to make a simple game a while back in OpenGL. The tutorials I used were (I believe) in OpenGL 2.0, using the fixed-function pipeline... glBegin(), glVertex(), glEnd() etc.

I'd like to remake the game using a more recent and applicable version of OpenGL, so I can put it on my portfolio. I need to support Windows XP onwards and DirectX 9 era graphics cards with GLSL. Could anyone advise me on which version I should be looking at? From the posts I've read on GD, it looks like either 3.x or 4.x?

There's a video of my original game here, which shows what I'm trying to achieve - although I'd like to extend the game with a couple of features and GLSL effects.

Cheers!
Advertisement
I think DirectX 9 corresponds to OpenGL 2, the legacy ways of doing things.

DirectX 10 (require Vista?) corresponds to OpenGL 3, but you can run OpenGL 3 on Windows XP.

OpenGL 4 adds some nice features, but it is basically compatible with OpenGL 3.3.

For an up-to-date excellent tutorial, see Learning Modern 3D Graphics Programming.
[size=2]Current project: Ephenation.
[size=2]Sharing OpenGL experiences: http://ephenationopengl.blogspot.com/
Thanks, that's great - from the wikipedia page it looks like the earliest cards I need to support can handle 3.0.

Appreciate the tutorials too!
I recommend ignoring all legacy and deprecated features (OpenGL2 and older). Take OpenGL 3 (or rather, 3.2 Core Profile) as the API to work against, and GLSL 1.50. See this page: http://www.opengl.org/wiki/Core_And_Compatibility_in_Contexts . Without compatibility features enabled, you can make sure you're not even accidentally using any old functionality.
Another way of looking at it, if you want to expand to mobile devices (OpenGL ES) later, is to look how OpenGL ES 2.0 maps to desktop OpenGL, and use only those features available in both. It should be a pretty close match to the non-deprecated parts of OpenGL 2.0 / 2.1 (ie. always use GLSL shaders, always use vertex/index buffer objects.)

If you want to support those minimum requirement GPUs even with old drivers, then using an OpenGL 2.0 context may yield better compatibility than OpenGL 3.0.

Hiya,

Coming from Direct3D, I decided to make a simple game a while back in OpenGL. The tutorials I used were (I believe) in OpenGL 2.0, using the fixed-function pipeline... glBegin(), glVertex(), glEnd() etc.

I'd like to remake the game using a more recent and applicable version of OpenGL, so I can put it on my portfolio. I need to support Windows XP onwards and DirectX 9 era graphics cards with GLSL. Could anyone advise me on which version I should be looking at? From the posts I've read on GD, it looks like either 3.x or 4.x?

There's a video of my original game here, which shows what I'm trying to achieve - although I'd like to extend the game with a couple of features and GLSL effects.

Cheers!


For the record, glBegin, glVertex etc is the immediate mode from OpenGL 1.0.
in 1.1 you used glDrawArrays instead and in 1.5 you got VBOs. 2.0 added high level shader support.

In general you can write fairly modern OpenGL for DX9 level cards using OpenGL 2.1 (and support is far better than for OpenGL 3.x/4.x), the main problem is that the old junk from 1.0 is still available for you so learning the correct way of doing things can be harder. (most OpenGL tutorials on the net are pure junk)
[size="1"]I don't suffer from insanity, I'm enjoying every minute of it.
The voices in my head may not be real, but they have some good ideas!
Thanks, good info. Based on the posts here, I've got a copy of the red book for OpenGL 3. If at all possible I'd like to support OpenGL 2.1 / DX9 generation hardware, at least for this project. Hopefully I can figure out from this book what was deprecated, and ignore those parts.


For the record, glBegin, glVertex etc is the immediate mode from OpenGL 1.0.
in 1.1 you used glDrawArrays instead and in 1.5 you got VBOs. 2.0 added high level shader support.

In general you can write fairly modern OpenGL for DX9 level cards using OpenGL 2.1 (and support is far better than for OpenGL 3.x/4.x), the main problem is that the old junk from 1.0 is still available for you so learning the correct way of doing things can be harder. (most OpenGL tutorials on the net are pure junk)


Wow, apparently I was doing it the really old way! I agree that most tutorials are outdated and not particularly helpful.

I'll have a looksie through the Doom 3 source as well, and see how they use the API.

Cheers!

In general you can write fairly modern OpenGL for DX9 level cards using OpenGL 2.1 (and support is far better than for OpenGL 3.x/4.x), the main problem is that the old junk from 1.0 is still available for you so learning the correct way of doing things can be harder. (most OpenGL tutorials on the net are pure junk)


Correct me if I am wrong, but even though much recent functionality is available for OpenGL2.1 cards, you are still stuck with the old version ([color=#000000][font=sans-serif]

GLSL 1.20) [/font]of the shader programming language?

Also, you can't take for granted that recent functionality is available, you have to verify each of them?

[size=2]Current project: Ephenation.
[size=2]Sharing OpenGL experiences: http://ephenationopengl.blogspot.com/
Would be useful to know, if anyone can clarify that :)


Also, you can't take for granted that recent functionality is available, you have to verify each of them?


Can you give any examples of this?

[quote name='SimonForsman' timestamp='1339335702' post='4947912']
In general you can write fairly modern OpenGL for DX9 level cards using OpenGL 2.1 (and support is far better than for OpenGL 3.x/4.x), the main problem is that the old junk from 1.0 is still available for you so learning the correct way of doing things can be harder. (most OpenGL tutorials on the net are pure junk)


Correct me if I am wrong, but even though much recent functionality is available for OpenGL2.1 cards, you are still stuck with the old version ([color=#000000][font=sans-serif]

GLSL 1.20) [/font]of the shader programming language?

Also, you can't take for granted that recent functionality is available, you have to verify each of them?
[/quote]

This is indeed the case, OpenGL 2.1 only guarantees roughly DX9 level features, everything else (including newer GLSL versions) can be accessed through extensions IF your card/driver supports it.
which is why i said fairly modern, the problem with OpenGL 3.x / 4.x is that support is pretty awful on Intel GPUs and on OS X (Lion is the only version with 3.2 support, the rest only have 2.1 and no OS X version have OpenGL 4 support yet) so in general if you are going cross platform with OpenGL you want to stick with 2.1 + extensions for a bit longer. (Most modern extensions are available in OS X if the hardware supports them)

[size="1"]I don't suffer from insanity, I'm enjoying every minute of it.
The voices in my head may not be real, but they have some good ideas!

This topic is closed to new replies.

Advertisement