GLIM gives you an interface very much like OpenGL's own immediate mode. It uses no deprecated functions, so it can be used with OpenGL 3.x and it works very well with GLSL shaders, without the need to worry how to bind vertex-arrays to shaders, etc. It is intended for when you want to render small or medium sized pieces of geometry, and just want to get it done easily. It uses VBOs internally and achieves decent performance.

New in release 0.3 is, that you can now specify batches of geometry once and render them as often, as you like, sort of like a geometry-only display-list. This achieves very good performance.

An example:

void RenderStuff (bool bRecreate)
{
static GLIM_BATCH glim;

// clear the batch, if the geometry shall be recreated
if (bRecreate)
glim.Clear ();

// if it is not yet created, do it
if (glim.isCleared ())
{
glim.BeginBatch ();

This is only a very basic example, but it should show that the interface is very straight-forward to use. All you need to do is bind a GLSL shader, that contains the attribute "Color" and GLIM will do the rest at the "RenderBatch" call.

If you simply want to render constantly changing data, you can actually ignore calling "Clear" and "isCleared" altogether.

Have fun with it,
Jan.

marshats

12-04-2009, 07:03 PM

Cool, works on Linux with only minor changes. The header name Main.h is a little indescript ;) To make and install it as a library permanently it would be better to have a more descriptive header name like glim.h.