OpenGL 2 Tutorials

Getting started with OpenGL

If you want to learn OpenGL, this is where we’re going to start. I’ll take you through getting a window on screen, drawing a few shapes, then adding lighting, textures and a camera. Once we’ve got those working, we can have a bit more fun with shadows, reflections and particles.

Start with your first OpenGL window, or have a look at the tutorials below.

OpenGL
OpenGL 1.x / 2.x
Fixed-function calls
Code
C++ and GLUT
FreeGLUT and GLEW setup
Before you start
Some basic C++
No OpenGL experience needed
Window & primitivesLighting & texturesCameras & effects

Tutorials

If you’re new to OpenGL, start at the top. We’ll add a little more to our program with each tutorial.

Before you start

You’ll need some basic C++ and a compiler. The first tutorial takes you through setting up FreeGLUT and GLEW, so we can get straight into drawing.

More tutorials

Once you can draw and texture a scene, why not try building some terrain? There are also a few extra pointers in OpenGL Drivers and OpenGL Tips.