Project 1

This is the first project for my computer graphics course offered by LSU under the direction of Dr. Kooima. The task of this project is to load meshes from disk using a specially designed text format and display them in a virtual 3D space. Below are some renderings of the project on different operating systems. The renderings are Windows 7, Windows 8, and OS X Mountain Lion, in order. 

Through development of this project, I've learned a good bit about the C programming language. I came from a background of learning C++ before C which made it somewhat difficult to adjust at first. However, that did not slow me down. My C programming style can be improved a little, but I'm working on that. I'm used to the object oriented style of C++ and the bottom up C programming approach is a little different than I'm familiar with.

I thoroughly enjoy the idea of code once, compile everywhere. I've made my Makefile cross platform compatible and I've made sure to adjust the required header includes based on the current platform. I love to see my code working on any platform that will compile the code. I often work in multiple operating systems while developing cross platform compatible applications using C++ and this was a key thing to get working for my first OpenGL application.

Development Process

The entire project is contained in project1.c. I realize I could create a separate module for handling loading files and rendering, but I built the project in layers. I will work on separating the different parts in the next project.

I first created the file reader for loading the mesh files into dynamically allocated arrays of structs. The first version of this file reader was a bit over complicated, but I met with Dr. Kooima to clear up the complexity of the file processing.

After I had the meshes loaded into memory, I proceeded to write the renderer. In addition to the basic requirements of loading models, I added a directional light, ambient light, and directional light to the scene. I also added the ability to transform/translate/scale the models using mouse input with code provided by Dr. Kooima's Util3D.







blog comments powered by Disqus

Month List

Tag cloud