Computer Graphics#

This site contains the notes used for the lab sessions for the Computer Graphics module. They are designed for students to work through in the labs with the help of the tutors. The content of each of the labs have been organised such that each one uses code from the preceding labs, so you will need to make sure you have completed each lab before moving onto the next one.

These materials are based upon the excellent OpenGL tutorials learnOpenGL by Joey de Vries and open-gl-tutorial.

Lab

Content

1

Introduction to C++: Introduction/revision of C++ fundamentals. Variables, arrays, loops and if statements. Functions, classes, methods and header files.

2

Drawing Basic Shapes in OpenGL: Window creation in OpenGL, Vertex Array Objects (VAO) and Vertex Buffer Objects (VBO), fragment and vertex shaders.

3

Textures: texture coordinates, mipmaps, texture filtering, applying texture maps to polygons.

4

Vectors and Matrices: Revision of vectors and matrices. Dot and cross products, matrix multiplication, transpose, the identity matrix and matrix inverse.

5

Transformations: Translation, scaling and rotation transformations. Applying transformations to polygons.

6

3D Worlds: Co-ordinate systems, the view, model and projection matrices.

7

Moving the Camera: using keyboard input, using mouse input, back face culling

8

Lighting: model loading, Phong’s reflection model, lighting shaders

9

Normal mapping: the tangent space, applying a normal map, specular maps

10

Quaternions: complex numbers and quaternions, rotations, SLERP


Jon Shiach

Dr Jon Shiach
Homepage: jonshiach.github.io
Email: j.shiach@mmu.ac.uk