GiGi: OpenGL Graphical User Interface Library

Home

Downloads

Documentation

Screenshots

License

FAQ

Subversion

Sourceforge Project Page


Valid CSS!

SourceForge Logo

FAQ

Why the name?
Why yet another GUI lib?
Where are the windows?
Is there a GUI editor?

Why the name?
I have no idea. I just started calling it GG early on, and now I can't remember what the G's stand for. Since then, I have discovered that another library calls itself GG, so I use GG and the phonetic "GiGi," which is the official SourceForge name, interchangeably.

Why yet another GUI lib?
I was writing a turn-based strategy game (TBS) under Windows, mainly because I was a student and wanted to supplement my computer science education with a larger project than the usual toy projects you get as a student. I started with DirectX and the MFC, and soon became frustrated with how badly designed the former was (as compared to OpenGL) and how ugly and opaque the latter was. I decided to switch over to OpenGL, using SDL as my basecode, and started looking around for a good GUI library to use with SDL. (Later, I removed the explicit dependency on SDL.) Everything I found was either:

  • Built upon some application framework that was incompatible (e.g. FLTK, which is built on GLUT)
  • Built on top of SDL, but was incompatible with OpenGL, lacked alpha support, or in some other way fell short
  • Difficult to customize visually; when making a game, you certainly want a high degree of control over the look of things, including the GUI
  • Missing something important: documentation!

So, I set out to create a GUI library that was agnostic with respect to platform, application framework, driver, and visual style. In other words, GG is designed to be a true software module. GG simply encapsulates the (often surprisingly complex) behavior of common GUI elements such as buttons, scrollbars, list-boxes, etc., so that the user needs only to provide GG with input and (optionally) rendering code. The only exception to the modularity of GG is that it must use OpenGL for rendering. This decision was locked in due to the fact that OpenGL is cross-platform, and due to my belief that OpenGL is inherently superior to DirectX, the only other viable alternative.

Where are the windows?
GG uses no window-manager windows (no X11 windows, no Windows-registered windows). All the GG::Wnds are invisible to Windows/the X11window manager. This is part of what allows GG to be a drop-in addition to your application, rather than forcing your app to use GG-isms outside of its GUI code.

Is there a GUI editor?
Yes and no. There is a really basic editor called GG-Sketch in CVS. It allows you to create the XML files that describe GG GUI elements, by graphically adding, resizing, editing properties of, and removing, GG controls. It is by no means ready for prime time yet, so go ahead and get check it out if you like, but don't get your hopes up that it will be all that useful at this stage. Later on, I plan to allow connections of signals and slots, some automatic code generation, and use of plug-ins that contain code for custom GG Wnd classes.

Projects
using GiGi:

FreeOrion