OpenGL seen through Hartley-Zisserman camera model
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.


multiple implementations of the OpenGL geometry pipeline for learning

This package includes and uses multiple implementations of the OpenGL geometry pipeline. Its purpose is to allow the curious coder to play around with the various approaches to decipher what OpenGL is doing with your coordinates.

For example, this code was written when I needed to compute an OpenGL projection matrix from a general camera calibration. See the blog post Augmented Reality with OpenGL.


  • Python, no OpenGL (numpy for geometry, matplotlib for drawning) src/
  • Python (pyglet for OpenGL and GUI) src/
  • Python (PyOpenGL for OpenGL and GUI) src/
  • C (OpenGL, GLUT for GUI) src/calib_test_opengl.c.
  • C++ (OpenSceneGraph) src/calib_test_osg.cpp.
  • C/GLSL (OpenGL, GLUT for GUI) src/calib_test_glsl.c, glsl.vert, glsl.frag.

All programs should be run from the data/ directory so they find the required files.

Quickstart instructions

So far only linux has been tested.

Build on linux

This is tested on Ubuntu 12.04:

mkdir build
cd build
cmake .. && make

Run on linux

Now change to the data/ directory and run your just-build executable:

cd ../data

Python scripts aren't copied into build/bin/, so run from the src/ directory:

python ../src/