Category Archives: Game Development

Debugging OpenGL Part I

Before we go further with our tutorials, we have to create a debugging system for our architecture (presented in Chapter I) to catch possible errors or warnings from the OpenGL API. At the moment we can only defend our program from shader errors when we try to read and compile them (check this tutorial on reading…

Read more

Projection Into the Matrix

We finish off our tutorials covering different matrix operations with the final matrix in the transformation chain featured in the picture below, which will result in either an orthographic or a perspective view on the scene. Orthographic and perspective projections The last usage of matrices we will cover in this tutorial series is translating the…

Read more

View Matrix

In the previous article we saw that our input mesh data (all vertices) requires 7 main stages of transformations to finally reach the window space coordinates. The first 4 stages are represented by matrix multiplications. You may still wonder why do we need three matrices and why we multiply them. Well, we use matrices to…

Read more

The Model Matrix

The transformation pipeline – a “Spatial Odyssey” In OpenGL geometric transformations are required in order to describe how the scene looks like. This involves converting from one coordinate system to another (since mesh data is introduced in 3D notation and has to be converted to 2D screen space). The previous tutorials built a mathematical foundation…

Read more

Geometric Transformations Part III

Matrix representation of 3D transformations As discussed in the previous tutorial, a 3 x 3 matrix defines a 2D transformation through the use of homogeneous coordinates. In a similar manner 3D transformations can be described though 4 x 4 matrices which is the topic of the current tutorial (and last part of the “Geometric Transformations”…

Read more

Geometric Transformations Part II

Homogeneous coordinates & matrix representation of 2D transformations The previous tutorial offered an introduction to 2D-space coordinates, and how to express an object in a coordinate system via matrices. The present tutorial will build on this information and introduce affine transformations by expressing 2D coordinates using 3 x 3 matrices, and as we will see…

Read more

Geometric Transformations

Vertex Transformation – A Spacial Odyssey After going through the novice “initiation” part of this tutorial series, you now possess a better grasp on the elemental aspects of real-time 3D rendering in modern OpenGL. There’s a lot of ground to cover still, and at this point it’s time to set a solid foundation in basic…

Read more

Iterating over STL map, STL vector, STL list and Array

Update: The post has been updated based on  feedback from reddit users: http://www.reddit.com/r/gamedev/comments/2ykhpg/iterating_over_stl_containers/  In computer games speed is always crucial so you really have to know what are the advantages or disadvantages of containers you want to use. I’m writing this article as a small parenthesis of a larger article where I presented the render loop…

Read more