Hi there

A few weeks ago i wrote a library that allows to render geometry very similar to OpenGL's immediate mode, but does so without any deprecated function. This means especially, that it requires you to use GLSL shaders with generic vertex attributes, ie. a purely shader-based approach.

One reason for me to write this library, was that i use generic vertex attributes with VBOs but usually the old-style glNormal / glTexCoord, when using immediate mode, because using generic vertex attributes with OpenGL's immediate mode is pretty annoying. So my library makes this very easy.

After using it for a while i found it worked really well, and thought i should share it with other gl users, that want to break free from the fixed function pipeline.

It can be downloaded here: GLIM

The readme included gives a more detailed explanation. A small example on how GLIM works:

Code :
 
// instanciate a GLIM object whenever you need one
GLIM glim;
 
// set gl states
 
// begin some geometry with the current state
glim.BeginPart ();
 
// set some vertex attribute to a start value
glim.Attribute4ub ("Color", 255, 0, 0, 255);
 
// begin a certain primitive type (just as glBegin)
glim.Begin (GLIM_LINES);
 
// render one line
glim.Vertex (0, -1);
glim.Vertex (0, 1);
 
// render next line with different color
glim.Attribute4ub ("Color", 255, 255, 0, 255);
 
// render another line
glim.Vertex (-1, 0);
glim.Vertex (1, 0);
 
glim.End ();
 
// end rendering with the current state
glim.EndPart ();
 
// change gl states and possibly render more

As you can see, GLIM really only handles geometry. It does not bother about gl states or anything else. That's the reason why it is so easy to just plug it into existing code. It does one thing and nothing more.

GLIM is released as full source code (you need to compile it yourself, but that should be really easy) and you are free to use and modify it as you wish.

Let me know what you think about it.
Jan.