Programming with OpenGL

Posted by Mordi on April 14, 2012, 6:24 p.m.

We decided to switch to C++ for our game. This is a better fit since our programmer will be using C++ and OpenGL at his university, and has proper knowledge about it, and I have been wanting to learn C++ myself. I'm not planning on learning it extensively, but I would like to know enough to make some simple stuff with it.

The last few days, I've gotten to the point where I can load and render images in a window. Now I'll be moving on to making an object-oriented system where I can make a simple user-interface. I might even look into making a system for rooms/states. We'll see how it goes.

Here's how it looks at the moment. It has some animation, but I'll just paste an image.

I'm using OpenGL, with GLEW and freeglut to handle the window and main program. I also use DevIL to load png-textures.

The reason we chose these particular libraries is that they are cross-platform compatible. Our programmer already has code that is cross-platform across Windows, Mac and Linux. Pretty cool!

Our programmer has extensive knowledge about game programming, so he'll be programming the engine we'll be using for the game. I just want to learn a thing or two, so that's why I'm making this.

Stay tuned for more.

Fin.

Comments

Mordi 12 years, 7 months ago

Xemic: That's pretty much the implementation I am using right now. Freeglut and GLEW, which is built into OpenGL. For image-loading I've used a different library though, called DevIL. I started out by looking at the OpenGL Superbible, which goes through OpenGL in a very similar fashion to those you posted.

Freeglut is rather easy to set up, but it is also very limited. It handles the update-event in a single-line of code that you have pretty much no control over. In the original GLUT, it would even handle the main loop completely for you, and you had to pass on functions that would be used at certain events, like a Window Reshape event, Draw event, etc. That's why SDL looks more appealing to me right now.