Having done my fair share of graphics work on the CPU I think it is high time that I get to know this thing called the GPU. I have read a lot about GPU rendering over the years but I haven’t actually done what counts, and that is to code something. I want to correct this, so I have started to create a modern OpenGL demo.
True to my goal, I don’t want to use any wrappers or any libraries which would hide the details of actual graphics programming from me. So far most of the work has centered around a hand crafted OBJ model loader, and dealing with a few of its strange problems.
The model I use for my demo was created by Dmitry Parkin, an awesome digital artist who has worked on many AAA games. The nice thing is its free, low poly, and normal mapped. Its always nice to work with good looking assets instead of my bad programmer art.
So far I can load an OBJ files vertex positions and texture coordinates. I generate the normals instead of extracting them from the file mostly as a hang up from and earlier stage of my OBJ parser. All of the geometry is stored in vertex buffer objects, which resides on the GPU instead of in host memory. The lighting is very crude at the moment, really being a bunch of hack in the shaders. This will be one of the next things to be tackled once I get my head around how to generate a bi-normal and tangent in order to make use of the normal map. Oh, and free flying cameras are soon to be implemented too, that’s a must.
I also started a GIT repo to make the source easier to share:
Make sure you have SDL and visual studio 2010 (Probably easy to port to Linux however).