Archive for August, 2012

Drawing with OpenGL

August 14, 2012


In this example I will try to explain how to visualize an opengl drawing in your drawing tool. This might apply to many shapes, but I think it is best  for plane geometric shapes like triangles, rectangles etc. (more…)


ENet Tutorial

August 12, 2012


ENet is a smart and powerful library to send packets using UDP. It can send those package even reliably. It relieves you from creating sockets to do communication. Nothing in this tutorial is new, that is not explained in the standard tutorial of or linuxjournal. First I could not figure out how to combine different parts of the tutorial to create a client and a server. When I read its usage on some mailing list it became clear to me how it would work. This tutorial will try to explain a simple chat application I found there. (more…)

Introduction to valgrind

August 11, 2012


Valgrind is a debugging tool. It runs target application in a virtual machine (this can cause larger programs to run slower).

OpenAL tutorial using ALUT

August 4, 2012

Source: The OpenAL Utility Toolkit.pdf

I will be using OpenAL Utility Toolkit in this example. You can say OpenAL is a 3D audio library. It can be used efficiently in games and many other applications that requires sound.

Getting Started

To play a PCM data (e.g wave file), we first create some buffers, fill in sound from filesystem to these buffers, attach these buffers to different sources. If we like position, move the listeners and sources and finally play the sources. You can think sources are sound generating sources, which can be situated in different places on the 3D space, listeners as ears. Lets see a simple code (ignoring listeners and sources) to see this.