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

Core routines

Basic AllegroGL functions. More...

Core Functions

Functions


Detailed Description

Basic AllegroGL functions.

These functions allow you to initialize AllegroGL, set up a rendering context via set_gfx_mode(), and allow access to regular OpenGL functions.


Define Documentation

 
#define allegro_gl_begin  )     ;
 

Backward compatibility #define for programs written prior to AGL 0.0.22. It isn't defined as anything meaningful, so you don't need to put them in your program.

See also:
allegro_gl_end()

Definition at line 135 of file alleggl.h.

Referenced by allegro_gl_printf().

 
#define allegro_gl_end  )     ;
 

Backward compatibility #define for programs written prior to AGL 0.0.22. It isn't defined as anything meaningful, so you don't need to put them in your program.

See also:
allegro_gl_begin()

Definition at line 145 of file alleggl.h.

Referenced by allegro_gl_printf().


Function Documentation

int install_allegro_gl void   ) 
 

Installs the AllegroGL addon to Allegro. Allegro should already be initialized with allegro_init() or install_allegro().

Returns:
0 on success; -1 on failure.
See also:
remove_allegro_gl()

Definition at line 793 of file alleggl.c.

References allegro_gl_clear_settings(), and remove_allegro_gl().

void remove_allegro_gl void   ) 
 

Removes the AllegroGL addon. You should not call any more OpenGL or AllegroGL functions after calling this function. Note that it will be called automatically at program exit, so you don't need to explicitly do it.

See also:
install_allegro_gl()

Definition at line 851 of file alleggl.c.

Referenced by install_allegro_gl().

void allegro_gl_flip void   ) 
 

Flips the front and back framebuffers.

If you chose, or were given, a double buffered OpenGL mode, you have access to a front buffer, which is visible on the screen, and also a back buffer, which is not visible. This routine swaps the buffers, so that what was the back buffer is now the (visible) front buffer, and vice versa.

Normally in these modes you would do all your drawing to the back buffer, without the user seeing the image while it's partially drawn, and then call this function to swap the buffers, allowing the user to see what you've drawn, now that it's finished, while you proceed to draw the next frame.

When drawing to the screen bitmap, you may not be drawing to what user currently sees on his monitor. Since the buffers are swapped, you will actually be drawing in the previous frame. It is recommended that you either rebuild the screen every frame, or modify both front and back buffers every frame by drawing once, then flipping, then drawing again.

See also:
allegro_gl_set(), AGL_DOUBLEBUFFER

Definition at line 909 of file alleggl.c.

Referenced by algl_do_dialog(), and algl_popup_dialog().

float allegro_gl_opengl_version  ) 
 

Returns the OpenGL version number of the client (the computer the program is running on). "1.0" is returned as 1.0, "1.2.1" is returned as 1.21, and "1.2.2" as 1.22, etc.

A valid OpenGL context must exist for this function to work, which means you may not call it before set_gfx_mode(GFX_OPENGL)

Returns:
The OpenGL ICD/MCD version number.

Definition at line 929 of file alleggl.c.


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