Jump to content

  • Log In with Google      Sign In   
  • Create Account


OpenGL version?


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
9 replies to this topic

#1 Telios   Members   -  Reputation: 398

Like
0Likes
Like

Posted 10 June 2012 - 03:45 AM

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!

Sponsor:

#2 larspensjo   Members   -  Reputation: 1526

Like
1Likes
Like

Posted 10 June 2012 - 04:19 AM

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.
Current project: Ephenation.
Sharing OpenGL experiences: http://ephenationopengl.blogspot.com/

#3 Telios   Members   -  Reputation: 398

Like
0Likes
Like

Posted 10 June 2012 - 05:10 AM

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!

#4 clb   Members   -  Reputation: 1777

Like
1Likes
Like

Posted 10 June 2012 - 06:05 AM

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.
Me+PC=clb.demon.fi | C++ Math and Geometry library: MathGeoLib, test it live! | C++ Game Networking: kNet | 2D Bin Packing: RectangleBinPack | Use gcc/clang/emcc from VS: vs-tool | Resume+Portfolio | gfxapi, test it live!

#5 AgentC   Members   -  Reputation: 1219

Like
1Likes
Like

Posted 10 June 2012 - 06:24 AM

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.

Every time you add a boolean member variable, God kills a kitten. Every time you create a Manager class, God kills a kitten. Every time you create a Singleton...

Urho3D (engine)  Hessian (C64 game project)


#6 SimonForsman   Crossbones+   -  Reputation: 5752

Like
1Likes
Like

Posted 10 June 2012 - 07:41 AM

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)
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!

#7 Telios   Members   -  Reputation: 398

Like
0Likes
Like

Posted 10 June 2012 - 11:44 AM

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!

Edited by Telios, 10 June 2012 - 11:49 AM.


#8 larspensjo   Members   -  Reputation: 1526

Like
0Likes
Like

Posted 10 June 2012 - 01:33 PM

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 (GLSL 1.20) of the shader programming language?

Also, you can't take for granted that recent functionality is available, you have to verify each of them?
Current project: Ephenation.
Sharing OpenGL experiences: http://ephenationopengl.blogspot.com/

#9 Telios   Members   -  Reputation: 398

Like
0Likes
Like

Posted 11 June 2012 - 02:59 AM

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?

#10 SimonForsman   Crossbones+   -  Reputation: 5752

Like
0Likes
Like

Posted 11 June 2012 - 09:11 AM


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 (GLSL 1.20) of the shader programming language?

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


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)

Edited by SimonForsman, 11 June 2012 - 09:12 AM.

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!




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS