How to make OpenGL games the easy way: libcig-a
Finity Flight II is pretty right? Well, today I am releasing my custom library that I used to make the game, libcig-a, under the LGPL.
So what’s special about it? I designed it to be the simplest way to get images to the screen bar-none. It runs on top of SDL and OpenGL — so its completely cross-platform. What makes it different is that I boiled away all of the stuff that you don’t need or don’t use much or is just stupidly complex when it doesn’t need to be.
As an example, want to load an image? It looks like this:
amImage("image.png",1,1);
This sets your current “brush” to use an image. Now, to draw the image, it looks like this:
amRect(100,100,128,128);
How about that? What could take like fifty lines of code with other libraries is two here. Everything is a snap in this library; everything is the way it should be. And not just that, but everything is ludicrously fast, because images and text glyphs are cached as they are initially loaded — nothing is read from the disk twice.
Completely, the library contains:
- amaryllis – the super easy 2D renderer
- acorn – a simple 2D math library
- asparagus – a simple buffering and string utility library
Plus three datastructures:
- A singly linked list, “List”
- A string-keyed hashtable, “NameTable”
- A memory chunk pre-allocator, “MemoryBlock”
So where can you download it?
http://storage.curvedinfinity.com/libcig-a.tar.gz
This package contains all of the C++ source, plus some pre-compiled dynamic libs for 32 bit linux.
Have fun!
Here is a screenshot from the “fractal.cc” example ap:
![]()
posted by Curved - 2006.11.03:12:06 Comments (1)
“How to make OpenGL games the easy way: libcig-a” – Good article.Congrats.
Comment by rowery — August 26, 2007 @ 5:39 am