alleggl.h File Reference
Main header file for AllegroGL. More...
#include <allegro.h>
#include <GL/gl.h>
#include "allegrogl/gl_ext.h"
Go to the source code of this file.
Core Functions
- #define allegro_gl_begin() ;
- Backward compatibility #define for programs written prior to AGL 0.0.22.
- #define allegro_gl_end() ;
- Backward compatibility #define for programs written prior to AGL 0.0.22.
- int install_allegro_gl (void)
- Installs the AllegroGL addon to Allegro.
- void remove_allegro_gl (void)
- Removes the AllegroGL addon.
- void allegro_gl_flip (void)
- Flips the front and back framebuffers.
- float allegro_gl_opengl_version (void)
- Returns the OpenGL version number of the client (the computer the program is running on).
Texture routines
Text Drawing and Font conversion
- #define AGL_FONT_TYPE_DONT_CARE -1
- Indicates that you don't really care how a font will be converted.
- #define AGL_FONT_TYPE_BITMAP 0
- Indicates that you want fonts to be converted to a bitmap format.
- #define AGL_FONT_TYPE_OUTLINE 1
- Indicates that you want fonts to be converted to an outline format.
- #define AGL_FONT_TYPE_TEXTURED 2
- Indicates that you want fonts to be converted to a texture format.
- #define AGL_FONT_STYLE_BOLD 1
- Creates a font with bold characters.
- #define AGL_FONT_STYLE_BLACK 2
- Creates a font with black (strong bold) characters.
- #define AGL_FONT_STYLE_ITALIC 4
- Creates a font with italicized characters.
- #define AGL_FONT_STYLE_UNDERLINE 8
- Creates a font with underlined characters.
- #define AGL_FONT_STYLE_STRIKEOUT 16
- Creates a font with striked out characters.
- #define AGL_FONT_STYLE_ANTI_ALIASED 32
- Creates a font with anti-aliased characters.
- #define AGL_FONT_POLYGONS 1
- Font generation mode.
- #define AGL_FONT_LINES 2
- Font generation mode.
- int allegro_gl_printf (AL_CONST FONT *f, float x, float y, float z, int color, AL_CONST char *format,...)
- Equivalent to:.
- int allegro_gl_printf_ex (AL_CONST FONT *f, float x, float y, float z, AL_CONST char *format,...)
- Prints a formatted string (printf style) on the screen.
- FONT * allegro_gl_convert_allegro_font (FONT *f, int type, float scale)
- Equivalent to:.
- FONT * allegro_gl_convert_allegro_font_ex (FONT *f, int type, float scale, GLint format)
- Converts a regular Allegro FONT to the AGL format for 3D display.
- void allegro_gl_set_font_generation_mode (int mode)
- Set the font generation mode for system fonts.
- FONT * allegro_gl_load_system_font (char *name, int style, int w, int h)
- Short hand for aglf_load_system_font_ex(name, AGL_FONT_TYPE_OUTLINE, style, w, h, 0.0f, 32, 256).
- FONT * allegro_gl_load_system_font_ex (char *name, int type, int style, int w, int h, float depth, int start, int end)
- Loads a system font.
- void allegro_gl_destroy_font (FONT *f)
- Destroys the font.
- size_t allegro_gl_list_font_textures (FONT *f, GLuint *ids, size_t max_num_id)
- List the texture ID of all textures forming the specified font.
Defines
- #define AGL_ALLEGRO_FORMAT 0x00000001
- Use Allegro-compatible framebuffer.
- #define AGL_RED_DEPTH 0x00000002
- Select the red depth of the frame buffer.
- #define AGL_GREEN_DEPTH 0x00000004
- Select the green depth of the frame buffer.
- #define AGL_BLUE_DEPTH 0x00000008
- Select the blue depth of the frame buffer.
- #define AGL_ALPHA_DEPTH 0x00000010
- Select the alpha depth of the frame buffer.
- #define AGL_COLOR_DEPTH 0x00000020
- Specify the total color depth of the frame buffer.
- #define AGL_ACC_RED_DEPTH 0x00000040
- Select the red depth of the accumulator buffer.
- #define AGL_ACC_GREEN_DEPTH 0x00000080
- Select the green depth of the accumulator buffer.
- #define AGL_ACC_BLUE_DEPTH 0x00000100
- Select the blue depth of the accumulator buffer.
- #define AGL_ACC_ALPHA_DEPTH 0x00000200
- Select the alpha depth of the accumulator buffer.
- #define AGL_DOUBLEBUFFER 0x00000400
- Creates a backbuffer if set.
- #define AGL_STEREO 0x00000800
- Creates seperate left/right buffers for stereo display.
- #define AGL_AUX_BUFFERS 0x00001000
- Creates additional auxiliary buffers.
- #define AGL_Z_DEPTH 0x00002000
- Select the depth of the z-buffer.
- #define AGL_STENCIL_DEPTH 0x00004000
- Select the depth of the stencil buffer.
- #define AGL_WINDOW_X 0x00008000
- Requests a placement of the window to a specified pixel location.
-
#define AGL_WINDOW_Y 0x00010000
- Same as AGL_WINDOW_X, but for the y-axis.
- #define AGL_RENDERMETHOD 0x00020000
- Set it if you'd like AllegroGL to pay special attention on whether hardware acceleration is present or not.
- #define AGL_FULLSCREEN 0x00040000
- Set if you'd like a full screen mode.
- #define AGL_WINDOWED 0x00080000
- Set if you'd like a windowed mode.
- #define AGL_VIDEO_MEMORY_POLICY 0x00100000
- Define AllegroGL's policy relative to video memory usage.
- #define AGL_SAMPLE_BUFFERS 0x00200000
- Define multisample parameters Some OpenGL ICDs expose an extension called GL_ARB_multisample which provides a mechanism to anti-alias all GL primitives: points, lines, polygons, bitmaps and pixel rectangles.
- #define AGL_SAMPLES 0x00400000
- Define multisample samples Set this value to the number of samples that can be accepted in the multisample buffers.
-
#define AGL_DONTCARE 0
- Ignore these settings.
-
#define AGL_SUGGEST -1
- Prefer the assigned values for these settings.
-
#define AGL_REQUIRE -2
- Reject other values for these settings.
-
#define AGL_KEEP 1
- Keep internal texture in video memory.
-
#define AGL_RELEASE 2
- Release video memory occupied by internal texture.
Functions
- int algl_do_dialog (DIALOG *dialog, int focus_obj)
- AllegroGL-friendly version of do_dialog.
- int algl_popup_dialog (DIALOG *dialog, int focus_obj)
- AllegroGL-friendly version of popup_dialog.
- void algl_draw_mouse (void)
- Draws a mouse pointer on the screen.
- void algl_set_mouse_drawer (void(*user_draw_mouse)(void))
- Sets (or clears) a user mouse drawing callback.
- int algl_alert (AL_CONST char *s1, AL_CONST char *s2, AL_CONST char *s3, AL_CONST char *b1, AL_CONST char *b2, int c1, int c2)
- AllegroGL-friendly version of Allegro's alert.
- int algl_alert3 (AL_CONST char *s1, AL_CONST char *s2, AL_CONST char *s3, AL_CONST char *b1, AL_CONST char *b2, AL_CONST char *b3, int c1, int c2, int c3)
- AllegroGL-friendly version of Allegro's alert3.
- int d_algl_viewport_proc (int msg, DIALOG *d, int c)
- Creates a viewport object where OpenGL commands can be performed.
- void allegro_gl_MATRIX_to_GLfloat (MATRIX *m, GLfloat gl[16])
- Converts an Allegro fixed-point matrix to an array of floats suitable for OpenGL's matrix operations.
- void allegro_gl_MATRIX_to_GLdouble (MATRIX *m, GLdouble gl[16])
- Converts an Allegro fixed-point matrix to an array of doubles suitable for OpenGL's matrix operations.
- void allegro_gl_MATRIX_f_to_GLfloat (MATRIX_f *m, GLfloat gl[16])
- Converts an Allegro floating-point matrix to an array of floats suitable for OpenGL's matrix operations.
- void allegro_gl_MATRIX_f_to_GLdouble (MATRIX_f *m, GLdouble gl[16])
- Converts an Allegro floating-point matrix to an array of doubles suitable for OpenGL's matrix operations.
- void allegro_gl_GLfloat_to_MATRIX (GLfloat gl[16], MATRIX *m)
- Converts an OpenGL floating-point matrix issued from the matrix stack to an Allegro fixed-point matrix.
- void allegro_gl_GLdouble_to_MATRIX (GLdouble gl[16], MATRIX *m)
- Converts an OpenGL double precision floating-point matrix issued from the matrix stack to an Allegro fixed-point matrix.
- void allegro_gl_GLfloat_to_MATRIX_f (GLfloat gl[16], MATRIX_f *m)
- Converts an OpenGL floating-point matrix issued from the matrix stack to an Allegro floating-point matrix.
- void allegro_gl_GLdouble_to_MATRIX_f (GLdouble gl[16], MATRIX_f *m)
- Converts an OpenGL double precision floating-point matrix issued from the matrix stack to an Allegro single-precision floating-point matrix.
- void allegro_gl_apply_quat (QUAT *q)
- Multiplies the Quaternion to the current transformation matrix, by converting it to a call to glRotatef().
- void allegro_gl_quat_to_glrotatef (QUAT *q, float *angle, float *x, float *y, float *z)
- Converts a quaternion to a vector/angle, which can be used with glRotate*().
- void allegro_gl_quat_to_glrotated (QUAT *q, double *angle, double *x, double *y, double *z)
- Converts a quaternion to a vector/angle, which can be used with glRotate*().
Variables
Detailed Description
Main header file for AllegroGL.
Definition in file alleggl.h.
Generated on Sun Nov 11 15:52:55 2007 for AllegroGL by
1.5.2