Author: Romain Vergne (website)
Please cite my name and add a link to my web page if you use this course

Image synthesis and OpenGL: exercices 03


We will use Linux and the following libraries:

Installing sources. In a terminal, do:
  1. Download the sources at
  2. If needed, edit the file to change paths
  3. To compile: qmake && make
  4. To run: ./tp03 models/
  5. To edit: use either your prefered text editor or qtcreator

Towards the OpenGL 4 pipeline

The goal of these exercises is to familiarize yourself with OpenGL vertex arrays and shaders (that's a lot!). You should obtain something like this:

Exercice 1: real-time coding (with the prof.)

Exercice 2: get familiarized with the code

Exercice 3: Play with shaders

Each time you change something in the shader file, you can test directly wihout having to re-execute the program since shaders can be compiled at runtime.
Simply press the "r" button (see viewer.cpp): it will call shader->reload and re-compile everything.
Your may also visualize the mesh in wireframe by pressing the "w" key.

Do not forget to read the GLSL specification for creating and modifying shaders.