Computergrafik (Kruijff)

July 5th, 2018




OpenGL Programming Guide (PDF)

Übungen / Resultate

OpenGL/SFML package (contrib. zip)

03. Draw und rotate tutorial03 Lösung: Rotation um Y-Achse und Planetensystem (Tastatureingaben siehe Source Code) von Daniel Ginter
04. Bezier Kurven tutorial04 Lösung: von Daniel Ginter U04_main.cpp
05. Kamera Steuerung tutorial05 Lösung: folgt
06. Triangulation of Point Clouds Meshlab bun180.ply
07. Rasterisieren von Linie mit Bresenham tutorial07 Lösung: Lösung von Daniel Ginter U07_main.cpp
08. – 09. Marching Cubes tutorial08 Übung Lösung von Helmut Buhler
10. – 12. Beleuchtung und Texturen


Farbmodelle Link youtube


CG Tutorial files

Setting up the tutorials

– Create a folder called cg_tutorial
– Extract to that folder. The folder should now contain two subfolders cmake and contrib
– Extract the tutorial*.zip to that folder as well
– It should now contain another folder called u*

Building the tutorials
The tutorials use the cmake build system. By using cmake you are able to create make and project files for various IDEs and platforms.
Please keep in mind that you’ll need to have SFML ( and GLEW ( installed.
To get you started here is a short tutorial for Linux and Windows:

– Install SFML (minimum 2.0) and GLEW
– cd to the tutorial’s directory
– create a build folder
– cd to that folder
– execute
cmake ..
it will generate a makefile. In case it gives you errors try to fix missing dependecies
– execute
– wait for the program to compile
– execute the executable

– install cmake
– open a command line
– cd to the directory of the tutorial
– create a new folder called build
– cd to that build folder
– execute cmake with -G to show a list of generators
– select the generator of the IDE of you choice and use the path to the upper directory as second parameter
e.g. cmake -G “Visual Studio 12 2013 Win64” ..
creates a Project file for “Visual Studio 2013” and sets the architecture to 64 bit
– Open the newly generated projecte file (e.g. .sln for Visual Studio in you IDE)
– Try to compile it
– In order to launch the application from within Visual Studio you need to set the Startup-Project:
– In the solutions explorer (Window on the left/right containing ALL_BUILD, U0<NUMBER> and ZERO_CHECK) right click on U0<NUMBER> and select “Set as StartUp Project”
– When you try to execute you code it might complain about missing dlls. The dlls are provided in the contrib directory
Copy the DLLs of the architecture of your choice to compilers output directory (where the exe lives)
e.g. …./build/Debug
– Try launching the programm again
– If this should fail. Copy the dlls to your c:\windows\system32 folder

Comments are closed.