The Allegro Wiki is migrating to github at


From Allegro Wiki
Revision as of 13:28, February 15, 2008 by CGamesPlay (talk | contribs) (drop introduction heading (short article))
Jump to: navigation, search

AllegroGL is an Allegro add-on that allows you to use OpenGL alongside Allegro -- you use OpenGL for your rendering to the screen, and Allegro for miscellaneous tasks like gathering input, doing timers, getting cross-platform portability, loading data, and drawing your textures. So this library fills the same hole that things like glut do.

AllegroGL also automatically exposes most, if not all, OpenGL extensions available to user programs. This means you no longer have to manually load them; extension management is already done for you.


AllegroGL is a addon for Allegro 4.2.x and 4.4.x. It losses its purpose for Allegro 4.9.x since it has OpenGL support integrated.

To use AllegroGL the one has to put #include <alleggl.h>, call install_allegro_gl() and set a OpenGL graphics mode, like a minimal example shows in this document.

Once the graphics mode has been set, the one can use OpenGL commands to draw to the screen. With a good OpenGL knowledge this makes possible to implement good-looking 3D games. You can also code games in 2D using OpenGL.

For easier usage and porting of existing Allegro games, AllegroGL offers a so called Allegro GFX Driver Interface which implements Allegro graphics API using OpenGL commands, enabling Hardware Accelerated Allegro (AllegroGL).

AllegroGL also offers you a dozen of handy function to manage fonts, extensions, textures, etc. More info can be found in on-line docs.


Ever since the beginning of its development, AllegroGL has always been intended to be merged into Allegro once. With Allegro 4.2.x you have to download and build AllegroGL separately. In Allegro 4.4.x this process is simplified: AllegroGL is bundled in the package and the build system is integrated.

It is planed that most of the AllegroGL code will find its place in Allegro 4.9 branch, thus making AllegroGL project obsolete.