OpenGL

OpenGL programming in Ubuntu


Much of the mainstream graphics and games programming resources out there target the Windows platform (with good reason), either using an openGL implementation, or (mainly) the popular DirectX SDK. I have nothing against the said technologies nor the platforms, but I was always constantly needled by the realization that given the necessary hardware(VGA capable of custom vertex shader, custom pipeline rendering etc) and smart programming, all the bells and whistles seen in modern graphics can be applied in the linux world as well, using the OpenGL API. It would be worthwhile to mention maestro John Carmacks ‘Doom’ series of games, which do a great job of showcasing the capabilities of OpenGL. I have played around programming with DirectX as well as OpenGL on Windows, and decided to continue the experience by trying to see what I can do using OpenGL in the world of linux (working on Ubuntu 10.10, to be exact).

To this end, I wrote this tutorial, as i was having some problems trying to set up the proper environment in Ubuntu. I was looking around the web to see how to set up the openGL and freeglut libraries, but found bits and pieces which did not work completely, hence my tutorial.

One thing to notice about writing C++ OpenGL programs is that the FreeGLUT library greatly simplifies the framework in which we do our openGL coding. All the intializations, window creation and environment configurations are taken care of  by FreeGLUT, and we only have to concentrate on the rendering and the OpenGL state machine. This simplicity is a necessity when it comes to actually creating something interactive as a game, specially when testing or debugging.

I will write up more on what I manage to get done with OpenGL on the Ubuntu platform. It would be interesting to see what extremes the platform can go to, in terms of interactive graphics.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s