Which version of OpenGL should I code towards?

Hello,

So I am writing an in-depth 3D application and long story short, I ended up using an online tutorial which was based on OpenGL 2.1.

Obviously much of what I wrote can now be optimized.

So the question is should I code towards OpenGL 3.1 or OpenGL 4.0?

I’d like to code towards 4.0 but it seems like my application would have very little support.

Thank you for your time.

OpenGL® 4.0 support should be fairly common now, unless you are targetting an Intel GPU or you desperately want to support the current (April 2014) version of Mesa3D.

My suggestions is to use only features you actually need. If you can work with OpenGL® 3.1, why should you make the application depend on 4.0?

[QUOTE=Agent D;1259187]OpenGL® 4.0 support should be fairly common now, unless you are targetting an Intel GPU or you desperately want to support the current (April 2014) version of Mesa3D.

My suggestions is to use only features you actually need. If you can work with OpenGL® 3.1, why should you make the application depend on 4.0?[/QUOTE]

Thanks; it would be to squeeze out as much features as possible without sacrificing performance.

But at the end of the day compatibility (and thus OpenGL 3.1) wins.

unless you are targetting an Intel GPU

AFAIK Intel have caught up to 4.0

EDIT - I am becoming brain dead - removed the word not - I did not know Intel had got to 4.2

Intel supports 4.x with Ivy Bridge and Haswell: Support for Intel® Graphics

The Haswell GPU in my Windows machine reports 4.2 as the highest supported version.

Please re-read my post precisely and pay attention to my wording and punctuation. I first statet that 4.x support is fairly common by now. The word “unless” indicates an exception to that statement.

I never stated that Intel cought up. In fact, I’m quite surpriesed to read that Ivy Bridge supposedly supports OpenGL(R) 4.x