Starting out with OpenGL

I’m starting to learn OpenGL with the idea of making games. But getting to that point requires patience, time and practice.

My aim is to learn while also being able to hit as many platforms as possible since I usually work under Windows XP, but I’m considering to jump off to linux(Kubuntu) as some of my friends have done.

I have some knowledge of C++ and Java. Should I take one over the other for learning or developing? As far as I know, C++ performace is higher that Java, but is that performace hit really noticeable with today’s computers? Which one would you recomend for learning and for real development?

A drawback I see with C++ is portability… I know there are many multiplatform libraries for C++ to make the code behave equaly (or with very little changes) on a wide range of platform but they don’t come bundled with the language, you have to get them and compile them on your own.

With the release of OpenGL3.0, should I bother learning the old stuff from OpenGL 1.0-2.1? OpenGL3.0 is supposed to deprecate most, if not all, of the fixed pipeline? Is it worth investing time on learning it? Where should I start? Is there any site I can visit for OpenGL3.0 specific learning or an overall good start point?

Now that I’ve asked about multiplatform and OpenGL3.0, I know that exist windowing abstraction libraries (SDL, GLUT, GLUX, GLFW, etc) just for that porpuse… Anyone know if any of those libraries support OpenGL3.0 already? I know that LWJGL for Java have added OpenGL3.0 support already.

Any other starting tips or help is welcome. Thanks for any help you can offer.

It depends on the applications you are going to develop. For learning (or prototyping), I would recommend a high-level language. Java can be easy to deploy and the performance is good enough for most tasks. Take C++ if you know it well or if you absolutely need high performance. As for me, if I were to write games (and this would be relatively simple games), I would take Python and write performance critical parts in C or Pyrex.

You can always deploy the libraries along with the application…

Yes and no. GL3.0 still builds on the same model as GL2.0. Anyway, you shouldn’t bother with the fixed pipeline, but start with shaders right away… And you won’t find any mature GL3.0 tutorials due tot he fact that first driver that supports it was released this week…

I know of no windowing toolkit which would use the new context creation function introduced in GL3.0…

Imo you will be in short- to mid-term more productive with Java, so if that’s your main motive go Java. Otherwise you will probably learn a lot more about programming with C++, which is applicable to every programming language in existence, although it has a steeper learning curve.
My suggestion would be to learn both, possibly Java after C++.

About real development, every language you can use to efficiently solve problems will work. Performance hit is not really connected with the programming language, rather with the programmer badly messing up.

You can always write nonportable code in any language. Same with C++, you can grab portable libraries and write cross-platform code or stick to platform specific libraries. Note that you can also use precompiled static or shared libraries so there’s no need to compile them yourself if you don’t want to.

That’s good. Now you will able to quickly download & install required libraries (Mesa, Free glut etc.) and get started.

Many OpenGL demos/sample programs on internet are written in C and C++. For example mesa demos available on

Not to mention, many books (like Computer Graphics using OpenGL by Hill) use C and C++. So for learning purpose, C and C++ is a good choice.

Thanks for the replies. Although it’s double work, I’ll try to work with C++ and Java at the same time, so I can improve my skills with both while learning OpenGL.

I’ve been able to lay my hands on a few books, Begining OpenGL Game Programming, More OpenGL Game Programming and OpenGL Superbible. As far as I know, the first one and half of the supuerbible only covers the fixed pipeline. The second one and the second half of the superbible cover shaders. Are they any good? Should I dump them in favor of the “Orange Book”?

NetBeans has a gem of a JOGL plugin I’ve been playing with. Lots of samples with good documentation, including all redbook demos - nice little GLSL editor with syntax lighter to boot…

P.S. More OpenGL Game Programming comes highly recommended, as do the others.