Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm just getting started with game programming and I want to start learning opengl. I found a very great tutorial from scratch to get started with opengl 3 and I'm wondering if there is a big difference between openGL 3 and openGl 4. Or I should ask, does openGL 4 make openGL 3 obsolete, or I can start with openGL 3 and then I can move to openGL 4?

share|improve this question
up vote 11 down vote accepted

I'll start this off by linking to an explanation of how OpenGL versions work. In short, OpenGL (generally) is backwards compatible, so all GL 3 code works just fine on GL 4 implementations.

The 4.x series of OpenGL versions represents what you might call "Direct3D 11"-class hardware. It exposes functionality of that hardware. D3D10 hardware is represented by the 3.x versions of OpenGL. So "moving to openGL 4" means abandoning lower hardware, or having multiple rendering pathways.

A detailed breakdown of the actual feature changes between 3.3 and 4.2 can be found in the 4.2 specification. Do note that many features (separate_shader_objects, shading_language_420pack, texture_storage) are not restricted to 4.x hardware; they are API changes and you can access them on 3.x hardware via extensions.

The most salient question is this: what does GL 4.x allow me to do that I can't with 3.x hardware?

Tessellation is probably the most well-known feature. It is also probably the least generally useful. That's not to say that it's useless; proper use of tessellation can enhance detail in models. But to me at least, it's not really the best thing GL 4 has going for it.

Shader subroutines are an interesting idea. This basically allows you to dynamically piece together different fragments of shaders. You can more or less attach a function to a specific bind point in a program. The specification is a bit hard to follow, but it's good functionality.

I'd say that image load/store is probably the most overlooked and yet most powerful bit of GL 4 functionality. With it, you have the ability to implement order-independent transparency with performance that's about as good as OIT is going to get. There are probably many other uses for image load/store, but it will take cleverer people to figure them out.

There are some odds and ends in GL 4. Stuff like double-precision support and indirect rendering. These are more GPGPU-style stuff, so it probably won't be of much use in a game.

But generally, GL 4 doesn't radically change how you implement feature X from GL 3.

share|improve this answer
I just have to say, you are completely wrong to say that indirect rendering is 'GPGPU-style stuff'. It is a great performance boost for any renderer that would otherwise make many calls from the CPU and is a great feature for games. – CoffeeandCode Jul 30 '14 at 3:45

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.