Code Snippets
What's That?
I am using it actively
I planning to use/learn it
I don't plan to lean/use it
5th option
Home :: Programming :: Code :: Overview

[ Overview ]

Here I have a list of classes and other programming stuff that make programming easier. Also the source code of some of my projects can be found here. At the moment there is not much documentation included, so em@il me if you have questions. Most code is written in VC++ but it should no problem to use it in other environement or on other platforms.

[ OpenGL | General | Source Code ]

OpenGL specific

OpenGL/Mfc base code
This is the base code I use for all my OpenGL projects. It uses Mfc and two of my helper classes, SScreenmode and OpenGLDevice which are included.
Helper class that makes creating a OpenGL rendering context very easy. Instead of 30+ lines of code you need 2.

Helper class that simplifies dealing with vertical syncronisation (VSync). Allows you to enable/disable it and to check whether it is on or off. Check out the snippet about VSync.

Helper class that simplifies creating OpenGL textures. Like STexture but loads TGA image files. Platform independent.

OpenGL/SDL base code
An C++ OpenGL framework using SDL that can be used as a starting point for your projects. Platform independent.

Class that loads Bitmaps from a file and then creates an OpenGL texture. Simple but useful in projects with many textures.

Set of classes that simplify creating OpenGL Bitmap and Outline fonts. Works under Windowy only! Try SBMPFont instead.

This class is derived from STexture and has the same functionality but loads JPEG files. The Intel© JPEG Library is needed.

A very useful OpenGL wrapper class that allows you to render an OpenGL scene/OpenGL commands to a texture of any size. After rendering to it, you can use it like any other texture and map it to say a cube or any other object.

OpenGL header file that defines all imporant extenion functions and constants.

Helper class that simplifies creating OpenGL textures. Uses SDL to load bitmap image files. Platform independent.

sbmpfont is a little helper class that allows you to draw fonts in an OpenGL application. The font is loaded from a normal bitmap texture which has a size of 256x256. Platform independent with SDL.

This class set makes it easy to use GLSL fragment and vertex shaders. Either load the shader from file or specify it in your code. Additionally provides a function to setup the GLSL extension.


This class loads JPEG files using the Intel© JPEG Library. It is used by the SJPEGTexture class.

Simple timer class. Useful in games or applications that use a timer. Depeding on the CPU, the class uses the performance or the standard Windows timer.

SScreenmode sets the screen resolution in few lines of code.

A standard String class with most of the features you need. This class should be platform independant.

Helper class that makes using POSIX threads under Unix systems very easy.

Little class that handles Joystick input. It desn't use DirectInput but the normal Windows functions.

A class that simplifies creating of a DirectDraw device. Can be used to either create a windowed or a fullscreen device.

A class that simplifies using a logfile. Take a look at the Using a Logfile code snippet to see how it is used.

Templated C++ class that has everything you need about a vector object. Can be used with glVertex3fv etc.

Source Code

Memory Sourcecode
VC++ Sourcecode of the game Memory. You have to install the Intel© JPEG Library before you recompile the project. More info about it in the projects section.

OpenGL Drawer Sourcecode
VC++ Sourcecode of the OpenGL app OpenGL Drawer.

TextToBin Sourcecode
VC++ Sourcecode of the Mfc application TextToBin.

PrimeCalculator Sourcecode
VC++ Sourcecode of the Mfc application Prime Calculator.

FileEditor Sourcecode
VC++ Sourcecode of the Mfc application FileEditor.

 Last edited 2006-02-03 18:15:36 by André Stein - printable version
» copyright by andré stein
» using stCM v1.0
» steinsoft.net revision 5.0