Programming

Home | Tips & Tricks | OpenGL Tutor | Links | Docs
Comments? Suggestions? E-Mail me at
nkmiller@calpoly.edu
Environment Mapping Demo -- envmap01.jpg
A simple environment mapping demo. Not that complex but it looks really nice. I am not using OpenGL's texture coord generation feature, I am doing all calculations on my own. The demo has a menu so you can load different models on the fly and see what they look like. That's about it, enjoy.
Vertex Array & Lightmap Demo
A simple demo that renders lightmaps onto a cube. Uses vertex arrays and multitexture if multiteture is supported. Source is provided in the application zip file.
Boom
This is just an eye candy demo. It looks like fireworks being shot off into space so thats why I named it Boom. There is source included with the binaries so have a blast with it. Screenshots will come later once I free up some space on my site.
Terrain Demo -- tdemo00.jpg / tdemo01.jpg
This is the same program as my terrain test below except for the fact that this version comes with source and it has a menu to change features rather than a console. I wrote this so I could provide source code to people who wanted to see the source to the other version of this app. Source is included with the above .zip file.
BSP Demo -- bsp00.jpg
This is a very simple BSP tree demo. Nothing fancy at all in this once, just bare bones BSP building and rendering. If you are a beginner and would like to learn some about BSP trees take a look at this demo. Source is included with the binary.
Spin Thing -- spin00.jpg
Don't know how to describe this one. So take a look at the screenshot, it should give you an idea about what this little demo is all about. Its basically little sparks or points of light on a sphere that rotate around. There is source code bundled with this binary.
Bezier Patch Demo -- bpatch00.jpg / bpatch01.jpg / bpatch02.jpg / bpatch03.jpg
This is just a simple test of a bezier patch. The surface is texturemapped and you can tesselate the surface in real time. The lighting is per face which needs to go, but I will get to that later. I am *not* using OpenGL to do this by the way, I am doing all of the calculations on my own.
glTexFont (Release 6) -- gltexfont00.jpg / gltexfont01.jpg / gltexfont02.jpg / gltexfont03.jpg
What is glTexFont? It is a library for OpenGL that will allow you to draw text into a OpenGL scene. You can now have 2D text over your 3D world. Also I am releasing the source for the library so you can make modifications and submit them to me so we can make glTexFont even better. Follow the link about to get to the glTexFont page.
ASE Loading Code and Demo -- ase00.jpg -- ASE File Format Document
This is code to load up .ASE files which 3D Studio Max exports too. Currently the codebase only supports loading up vertex and face information, vertex and face normals and texture information. Its pretty raw as of now but I hope to get some feedback about the code so I can improve it to something that will be usefull. Im sorry about the size, the ASE file and the texture I am using for the demo are quite large so it fattens up the .zip.
Texture Tutorial
This is a simple example of using my Targa code(see below). The above zip contains everything you need to get this example up and running. The demo has mouse control and animation.
Wavefront Object Viewer w/ Source
This is just a simple .obj model viewer. It only draws wireframe models because I decided that if you want to add the shading and lighting you could do it yourself :) I structured the code so that it is possible to do so. Let me know if there is anything wrong with it.
Screenshot Code
This is a simple example of reading from the frame buffer and then writing it to a targa file. Its like the screenshot ability that all of our favorite games have.
UConsole -- uconsole00 / uconsole01 / uconsole02
UConsole is my current project and is going to be a "drop in" console for programmers who wish to implement a console system into their applications. Follow the link above to learn more about this project on the UConsole page which has screenshots, binaries and source.
Bezier Curve Demo -- shot00
This is a simple Bezier Curve Demo. Nothing great just a stepping stone towards mimicking Quake3Arena curved surfaces. Check it out.
TGA Loading Code
This is code ripped from one of my programs that loads 8, 24 and 32-bit Targa files. If there are any problems with it let me know. This code evolves each time I use it so something that may be a problem in the files that are uploaded on the server may be already fixed.
Transparency Test -- shot00
As the name of the program states this is a transparency test. A Cube is texture mapped with 32bit targas and it can be rotated or animated. Pretty spiffy stuff here. Check out the readme.txt for more info!
Lighting Test -- shot00
Simple lighting of a textured cube. I sure use cubes a lot don't I? Oh well this is just a simple demo showing off the OpenGL lighting model.
Terrain Test (Release 4) -- shot00 / shot01 / shot02 / shot03
This program generates random fractal terrain using the Diamond Square algorithm.
Conv (Source)
This program is REALLY simple. All it does is takes a .raw file and converts it to a .raw file that contains the RGBA channels rather than RGB. I wrote this so I didn't have to convert my textures to RGBA at runtime. I doubt it makes much of a difference but it was something to do. The error checking is scattered about so if it crashes thats why. Source is avaliable if you would like to use it for your own little projects.
ModelEd
Check out the ModelEd page for info on my simple model viewer. Page consists of my ramblngs about what I need to add to the program and my progress with it.
GLUT
For almost all of the programs that will be on this page you will need GLUT. Why do I use GLUT? I am using it because it allows me to write demos without having to worry about the underlying Windows nightmare. I am out to write demos that show my skill as a programmer so I would rather use GLUT and get a neat demo out quickly rather than use Win32 and have it take much longer.