PDA

View Full Version : GLUT Object-Oriented Framework for Beginners



Paul Solt
08-22-2010, 10:36 AM
I've created a simple C++ object-oriented wrapper around GLUT that uses a cross-platform high resolution timer. It runs on Mac/Windows and I've included a sample Xcode 3.1 and Visual Studio 2010 project for beginners.

The high resolution timer allows you to set a precise frame-rate (60 FPS), which is something you don't get with the glutTimerFunc() function. The code was used in my animation project and I've since re-factored it out to post on github.

It only takes four lines of code to get started and it'll take care of boilerplate code that can be intimidating for beginning graphics programmers. You can extend the behavior by sub-classing and implementing your own display routines. It's released under the MIT License and you can use it for animation or game projects.



#include "GlutFramework.h"
using namespace glutFramework;
GlutFramework framework;
framework.startFramework();


Check it out on github: http://github.com/PaulSolt/GLUT-Object-Oriented-Framework
Read about it on my blog at: http://paulsolt.com/2010/08/glut-object-oriented-framework-on-github/

http://paulsolt.com/wp-content/uploads/2010/08/teapot.png

-Paul Solt