Monthly Archives: August 2013

Rendering my first 3D object in OpenGL

Summer means longer days and shorter nights, but it never appears that way to me. It goes by quicker and quicker every year.

 

In the past few weeks I’ve taken an interest in learning OpenGL. I’ve dabbled with WebGL a year ago but the concepts weren’t really sinking in. Now a year later, I wanted to learn OpenGL because I wanted to do some work in C++ to see what it’s like developing games for the desktop.

 

So far it’s been pretty good and I’m beginning to understand how OpenGL works. I’ve been told to steer clear of the fixed-function pipeline, which has been deprecated and I believe was removed sometime in OpenGL 3.x, so I’m using the programmable pipeline which involves shaders. I think I have a decent understanding of the basics and the basic knowledge of “modern” OpenGL has been easily transferrable to WebGL and OpenGL ES considering they both use the programmable pipeline. Although I haven’t done anything advanced yet, I’m enjoying it so far. Yesterday I rendered my first 3D object. It was a colored prisim rotating around the Y axis based on time. It has a FPS-like camera too, it’s not much but here’s the executable if you wanna check it out (use WASD and the mouse to move):

http://www.speedyshare.com/2BfpY/sfml-test.zip

 

For the window, sounds, and input I’m using a library called SFML. I like it so far. I thought about SDL but since I’m writing in C++ I thought it’s best if I use SFML as it’s written in C++ as opposed to C.

 

In other news, I had an interview with NVision’s Patrick Shaw this summer. If you haven’t heard of NVision, it’s a cool app that delivers the latest news about gaming, movies, pretty much any entertainment in general.

 

Shaw posted an article about Stellar Alien and it was great. There was even a spike in the game’s installations on Google Play, so I thank Patrick Shaw for taking an interest in the game and posting the article.

Want to read it? It’s right here