Lesson 6: OpenGL transparency and blending

cube3
In this short tutorial we will demonstrate how to do blending in OpenGL. You may notice in the final code we load two different textures:  one background texture and one object texture (glass). The background will be a normal square. The cube will blended on top of it,...
Continue reading »

Lesson 5: Fire in OpenGL, Particle Engine

fire
To create a fire/explosion like effect we can use the same particle engine as in the previous tutorial (starfield) but we have to modify the code a little bit. All particles move upwards; in addition, every particle has to moves at a different speed, and start from the...
Continue reading »

Lesson 4: Starfield Particle Engine OpenGL

starfield
  We introduce a simple particle engine. A particle engine can be used for many purposes in 3d graphics such as fire, explosions, lasers, stars and many other fun things! To make a particle engine, we need to have a particle set.  The set consists of N elements...
Continue reading »

Lesson 3: Cube Font

letters
Using the code given in the last tutorial, it is easy to create a cube font. We have altered the code to display letters, but used the same principle. Again, we have defined a matrix A of MxN but this time we have increased its with to fit...
Continue reading »

Lesson 2: Maze

maze
We have extended the previous tutorial to draw a nice looking maze. We have defined a matrix A of NxM with the elements {0,1}. If an element is {1} a cube will be placed, if an element is {0} nothing will happen.  Thus, we define the matrix as:...
Continue reading »

Lesson 1: Textured Cube

textured cube
In this tutorial we will explain to you how to make a textured cube using OpenGL and SDL. You will need to have the GNU C Compiler (short gcc) installed.  Furthermore you of course need OpenGL and SDL installed. If you are on Ubuntu Linux you can use...
Continue reading »