OpenGL

Simple FPS Engine

As my final project in my OpenGL class, I made a simple first-person shooter engine. This engine uses the Win32 API, so it is not cross platform. It gives the player the ability to move around in a simple two room level. They can also shoot a small red cube in the direction they are looking. The walls are textured and a simple model of a dragon head is loaded to demonstrate per-vertex lighting.

Executable
Source Code

Off File Converter

I created this simple application to use off file models inside of my simple FPS engine. The issue was that off file polygons can have unlimited number of vertices. My engine was designed around triangles, so anything more then 3 vertices would not work. This program goes through the model and scans each polygon. If it finds one that has more then 3 vertices, it splits that polygon into triangles. I also added the feature of vertex combining using an index list in order to remove vertex redundency. Along with that, the program calculates the normals for each vertex.

Executable
Source Code

Smooth Lighting and Text

This demo demonstrates simple flat shading and more complex smooth shading. The smooth shading method gets rid of vertex redundancy and combines the normals correctly. Bitmapped text is also added to this demo.

Random Lights

Random spotlights shining onto a flat surface

Textures

A demonstration of texturing and texture coordinates

Primitives

This demo shows off some of the basic primitives that can be drawn in OpenGL