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

Setup

We will use Linux and the following libraries:

Installing sources. In a terminal, do:
  1. Download the sources at http://romain.vergne.free.fr/teaching/IS/data03/TP03.tgz
  2. If needed, edit the file main.pro to change paths
  3. To compile: qmake && make
  4. To run: ./tp03 models/file.off
  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.
 


PREVIOUS: 03 - PIPELINES
NEXT: 04 - LIGHTING