views:

114

answers:

3

Can I expect users to be able to run software that uses OpenGL 3.x?

Can Linux users who have open-source graphics drviers run OpenGL 3.x? I know that Mesa3D 7.8 only supports OpenGL 2.1.

I also know that OS X Snow Leopard supports some but not all OpenGL 3.0 features. I don't know the situation on Leopard.

I don't know the situation on XP, Vista, and Windows 7.

I'd like to start learning OpenGL, and my interest lies more in scientific and engineering applications than games. I know I'll be reading code that uses OpenGL 1.x, but I'd like to write code using the newest specification I can expect user's systems to support. I'm wondering whether I should start learning 2.1 or 3.3. I was thinking of getting either the 4th edition of the OpenGL Superbible to learn 2.1 or the 5th edition which is coming out July 30 to learn 3.3. (I have a bachelor's in physics, so my math background is pretty good.)


Edit: I found this related question with answers that are relevant to my question.

A: 

I don't know the situation on XP, Vista, and Windows 7.

Bad - most cards claim to support openGl 2.0 or 2.1 but unless they are Nvidia don't expect any features beyond 1.1 to work

IIRC windows vista/7 supports opengl 1.1 in software or 1.4 with a directX wrapper. The graphics driver is free to support whatever it wants but except for Nvidia the quality is poor.

Martin Beckett
If that's the case, is conditional compiling the way to go?
procrastinate_later
I think that's a little bit harsh. My ATI X1900 card had good support for OpenGL 2.1. The driver for my new HD5770 is supposed to support OpenGL 4.0, though I haven't had a chance to put that to the test yet.
Incredulous Monk
If the version info received from OpenGL driver is 2.1 (or any other version), then I think it is safe to assume that the core functionality for that version is there. There won't be much problems unless you go into details or encounter some problems for a specific hardware. Even if so, it is the vendor's fault, not yours, and you can question if you really need to support your program for that hardware.
tersyon
+2  A: 

As Martin Beckett already pointed out, the situation is really rather bad as far as support for OpenGL 3.x is concerned. Many "modern" graphic chipsets widely used in notebooks (yes, Intel, I'm looking at you) do not even fully support OpenGL 2.x; some even lack features as old as multisampling.

The only way to make your software run on as many systems as possible is to use things like GLEW to decide which features to use at runtime (i.e. no need for conditional compiling).

As far as learning OpenGL is concerned, 2.1 is definitely a good choice, because it enables you to understand both older code using the fixed-function pipeline and more modern code relying on shaders. Afterwards, getting to grips with the most important 3.x features (e.g. frame buffer objects, vertex array objects) will be rather easy.

Greg S
I agree that checking platform support on run-time is definitely required, but I do not agree that 2.1 is a good choice. The API just got a lot smaller in 3.0 without deprecated features, and I believe that understanding shaders and programmable pipeline is the way to go with learning the real 3D programming. The problem is just that not so much tutorials are available for the new pipelines, but it will not be so in a few years I hope.
tersyon
+1  A: 

The Windows XP drivers for Intel's GMA 950 only support OpenGL 1.4, sans GL_EXT_framebuffer_object. Oddly enough on the same exact hardware (a Mac mini) both Linux and OSX manage to support GL_EXT_framebuffer_object.

genpfault