Main Page | Modules | File List | Globals | Related Pages

Screen update modes

True OpenGL programs don't need to use these, and none of them work very well. More...

Screen update modes

Functions

Variables


Detailed Description

True OpenGL programs don't need to use these, and none of them work very well.

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.


Define Documentation

#define AGL_MODE_DIRECT   0
 

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.

Deprecated:

#define AGL_MODE_DUPLEX   1
 

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.

Deprecated:

#define AGL_MODE_OPAQUE   2
 

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.

Deprecated:

#define AGL_MODE_MASKED   3
 

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.

Deprecated:

#define AGL_MODE_OPAQUE_RT   4
 

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.

Deprecated:

#define AGL_MODE_MASKED_RT   5
 

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.

Deprecated:


Function Documentation

int allegro_gl_screen_mode int  newmode  ) 
 

Sets the screen update mode.

Returns:
int Zero on success, nonzero on failure

Deprecated:
This function will be removed in a later version of AllegroGL

Definition at line 392 of file scrmode.c.


Variable Documentation

BITMAP* allegro_gl_screen
 

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).

Definition at line 52 of file alleggl.c.


Generated on Wed Jun 30 23:59:53 2004 for AllegroGL by doxygen 1.3.5