GLUT Object Oriented Framework on Github

In 2009 I took a Computer Animation course at @RIT I created an object-oriented C++ wrapper for GLUT. The idea was to create a set of classes that could be reused for each of the separate project submissions. The main class wraps around the GLUT C-style functions and provides a class that can be inherited from, to provide application specific functionality. The idea was to make the boiler plate code disappear and make it easier for novice programmers to get an animated graphics window in as few lines as possible. Only four lines of code are needed to get the window running at 60 frames per second. You can subclass the framework and implement your own OpenGL animation or game project.

Edit (8/22/10): You don't need to use pointers, I've updated the code example with working code.

// main.cpp
#include "GlutFramework.h"
using namespace glutFramework;
int main(int argc, char *argv[]) {
	GlutFramework framework;
	framework.startFramework(argc, argv);
        return 0;
}

[ad#Large Box]

The code uses a cross-platform (Windows/Mac tested) timer to create a constant frame-rate, which is necessary for animation projects. It's under the MIT License, so feel free to use it as you see fit. http://github.com/PaulSolt/GLUT-Object-Oriented-Framework

An Xcode 3.1 and Visual Studio 2010 project is hosted on github to support Mac and Windows. There is no setup on the Mac, but Windows users will need to configure GLUT. I plan on posted tutorials on how to get setup on both platforms. For now, look at the resources section below.

[caption id="attachment_617" align="aligncenter" width="504" caption="Animated teapot"][/caption]

Resources:

[ad#Large Box]

Artwork Evolution

I presented at BarCamp #5 Rochester http://barcamproc.org/ at RIT on my ArtworkEvolution project. Here are my presentation slides. ArtworkEvolution-Barcamp

I evolved images during the presentation and these are some of the results:

[caption id="attachment_550" align="aligncenter" width="448" caption="Curved Sky"][/caption]

[ad#Link Banner]

[caption id="attachment_551" align="aligncenter" width="448" caption="TV"][/caption]

[caption id="attachment_553" align="aligncenter" width="448" caption="Pillar"][/caption]

[ad#Large Box]

Texture Evolution

For my Genetic Algorithms class I decided to work based on the work of Karl Sims. I have built a system that can evolve images based on "user natural selection" over a period of time. The user plays god and can select those images that will live and die to produce new images. Here's a fun sample of images:

[caption id="attachment_398" align="aligncenter" width="448" caption="Curtains"][/caption]

[caption id="attachment_396" align="aligncenter" width="448" caption="Waves"][/caption]

[caption id="attachment_394" align="aligncenter" width="448" caption="Loops"][/caption]

[ad#Large Box]

[caption id="attachment_393" align="aligncenter" width="448" caption="Logo"][/caption]

[caption id="attachment_392" align="aligncenter" width="448" caption="Squirley"][/caption]

[caption id="attachment_391" align="aligncenter" width="448" caption="Hungry Curves"][/caption]

[caption id="attachment_389" align="aligncenter" width="448" caption="A Future Road"][/caption]

[ad#Link Banner]

[caption id="attachment_388" align="aligncenter" width="448" caption="Wallpaper"][/caption]

[caption id="attachment_387" align="aligncenter" width="448" caption="Pipes"][/caption]

[caption id="attachment_386" align="aligncenter" width="448" caption="Peace"][/caption]

[caption id="attachment_385" align="aligncenter" width="448" caption="Planet Rings"][/caption]

[ad#Large Box]