Lesson 16: Waving flag with OpenGL and GLSL

Waving Flag OpenGL
With the newer versions of OpenGL we are able to manipulate the OpenGL Rendering Pipeline. This gives a lot of power to the developers to do graphical manipulations and visual effects.  So far we have used the classical method to display 3D graphics.This (simplified) OpenGL pipeline is: Essentially...
Continue reading »

Lesson 14: Reflection (Easy cool effect)

OpenGL Reflection
The reflection effect is very easy to create in OpenGL, but at the same time it is a very cool effect. Creating reflection in OpenGL can be done simply by drawing the exact same scene twice, once in the positive and once in the negative direction. We can...
Continue reading »

Lesson 13: Face generation

OpenGL 3D Generated Face
We can generate 3D faces from 2D flat images. Using OpenGL this can be challenging, after all it is not a lot more than a primitive triangle rendering API. The technique we will use in this tutorial is very similar, if not nearly identical, to terrain generation in our previous tutorial....
Continue reading »

Lesson 12: Terrain Rendering with OpenGL

OpenGL Terrain
In this tutorial we will render terrains. Essentially a terrain is a complex 3d model.  It conists of vertexes, faces, texture coordinates, normal vectors etc.  Al though it is possible to load complete models such as Wavefront OBJ models, it is generally better to dynamically generate them.  First, we...
Continue reading »

Lesson 11: Loading Quake II (MD2) Models

MD2Loader
In this tutorial we will demonstrate how to load Quake II models.  The video game was released around 1997-1999, so models might be hard to find. You can however use/buy the original game. If you search a lot, you may also find some models online. Quake II models...
Continue reading »

Lesson 10: Loading Stanford PLY 3D Models

Bunny
Stanford PLY 3D models are similiar to Wavefront OBJs. Both are static objects. However, models stored in the PLY format are generally in binary format (e.g. unreadable with a normal text editor), but an ascii version of the format also exists. The files themselves store vertexes and faces.  If you...
Continue reading »

Lesson 9: Loading Wavefront OBJ 3D models

Wavefront OBJ Model OpenGL
In this tutorial we will load Wavefront OBJ 3D models. These models are static models (e.g. the model itself does not have any movement definition). You can get a set of example models here : http://people.sc.fsu.edu/~jburkardt/data/obj/obj.html  Remember to triangulate them in Blender or another 3d editing program. Every OBJ...
Continue reading »

Lesson 7: OpenGL Keyboard Control

cube3
You will need to change the previous code for this tutorial. OpenGL is used to communicate with the Graphical Processing Unit, so by default it does not contain keyboard control. You will need a library to communicate with the keyboard. We can use SDL (which we have been...
Continue reading »