My recommendation is simply to use OpenGL graphics calls to write to the screen -- that's why you're using AllegroGL after all, isn't it?
AllegroGL provides the global `allegro_gl_screen', which always points to what is initially returned as the screen bitmap -- you can draw onto this with (some) standard Allegro calls, and they get converted directly into OpenGL calls. I call this `direct' mode.
The other options revolve around `__allegro_gl_memory', a memory bitmap which is drawn to like any other memory bitmap. The exact behaviour here is determined by the precise mode selected, and this is all very experimental at the moment.
|
Default mode, and fastest for OpenGL operations. In this mode, screen just points at allegro_gl_screen. Allegro graphics calls acting on it are translated to similar OpenGL calls using a special (incomplete) vtable. If you call functions using unimplemented vtable entries, your program will crash.
|
|
Duplex mode. Allegro graphics calls acting on screen are performed in a memory buffer, which is filled from the OpenGL framebuffer before the call and pasted back afterwards. This is rather slow.
|
|
Opaque mode. As for Duplex mode, but the buffer is not filled from the OpenGL framebuffer, nor is it copied back there on the fly -- it is copied only when the update mode is changed again. The drawing is opaque, so any OpenGL-drawn graphics will be cleared.
|
|
Masked mode. As for Opaque mode, but the copy is performed in a masked drawing mode, so transparent pixels in your Allegro graphics will not obscure the OpenGL framebuffer. I doubt this actually works though.
|
|
Opaque realtime mode. Similar to Opaque mode, but your graphics are copied to the OpenGL framebuffer as soon as you finish writing to each line. In this way it is a `half-duplex' mode. This is probably not implemented.
|
|
Masked realtime mode. Similar to Masked mode, but your graphics are copied to the OpenGL framebuffer as soon as you finish writing to each line. AFAICS this concept is fundamentally flawed, and it is probably not implemented.
|
|
Sets the screen update mode.
|
|
Direct-mode GL `screen' bitmap. If you draw to this bitmap (using supported Allegro functions) your calls will be converted into OpenGL equivalents and appear on the screen (or backbuffer). |