AllegroGL: alleggl.h Source File

AllegroGL 0.4.4

- Main Page
- Related Pages
- Modules
- Files

- File List
- Globals

alleggl.h
Go to the documentation of this file.
1
5 #ifndef _allegrogl_included_alleggl_h
6 #define _allegrogl_included_alleggl_h
7
8 #include <allegro.h>
9
10 #ifdef ALLEGRO_WINDOWS
11
12 #ifndef WIN32_LEAN_AND_MEAN
13 #define WIN32_LEAN_AND_MEAN
14 #define WIN32_LEAN_AND_MEAN_defined
15 #endif /* WIN32_LEAN_AND_MEAN */
16
17 #ifdef ALLEGRO_DMC
18 typedef int32_t INT32;
19 typedef __int64 INT64;
20 #endif
21
22 #include <winalleg.h>
23
24 #ifdef WIN32_LEAN_AND_MEAN_defined
25 #undef WIN32_LEAN_AND_MEAN_defined
26 #undef WIN32_LEAN_AND_MEAN
27 #endif /* WIN32_LEAN_AND_MEAN_defined */
28
29 #endif /* ALLEGRO_WINDOWS */
30
31
32 #if (defined ALLEGRO_GL_DYNAMIC) && (defined ALLEGRO_WINDOWS)
33 #ifdef ALLEGRO_GL_SRC_BUILD
34 #define _AGL_DLL __declspec(dllexport)
35 #else
36 #define _AGL_DLL __declspec(dllimport)
37 #endif /* ALLEGRO_GL_SRC_BUILD */
38 #else
39 #define _AGL_DLL
40 #endif /* (defined ALLEGRO_GL_DYNAMIC) && (defined ALLEGRO_WINDOWS) */
41
42 #define AGL_VAR(type, name) extern _AGL_DLL type name
43
44 #if (defined ALLEGRO_GL_DYNAMIC) && (defined ALLEGRO_WINDOWS)
45 #define AGL_FUNC(type, name, args) extern _AGL_DLL type __cdecl name args
46 #else
47 #define AGL_FUNC(type, name, args) extern type name args
48 #endif /* (defined ALLEGRO_GL_DYNAMIC) && (defined ALLEGRO_WINDOWS) */
49
50
51 #ifdef ALLEGRO_MACOSX
52
53 #include <OpenGL/OpenGL.h>
54 #include <OpenGL/gl.h>
55 #include <OpenGL/glext.h>
56
57 #ifndef GL_GLEXT_PROTOTYPES
58 #define GL_GLEXT_PROTOTYPES
59 #endif
60
61 #else /* ALLEGRO_MACOSX */
62
63 /* HACK: Prevent both Mesa and SGI's broken headers from screwing us */
64 #define __glext_h_
65 #define __gl_glext_h_
66 #define __glxext_h_
67 #define __glx_glxext_h_
68 #include <GL/gl.h>
69 #undef __glext_h_
70 #undef __gl_glext_h_
71 #undef __glxext_h_
72 #undef __glx_glxext_h_
73
74 #endif /* ALLEGRO_MACOSX */
75
76
77 #include "allegrogl/gl_ext.h"
78
79 #ifdef ALLEGRO_WITH_XWINDOWS
80 #if (ALLEGRO_SUB_VERSION == 2) && (ALLEGRO_WIP_VERSION < 2)
81 # ifndef HAVE_LIBPTHREAD
82 # error AllegroGL requires Allegro to have pthread support enabled!
83 # endif
84 #else
85 # ifndef ALLEGRO_HAVE_LIBPTHREAD
86 # error AllegroGL requires Allegro to have pthread support enabled!
87 # endif
88 #endif
89 #include "allegrogl/alleggl_config.h"
90 #endif
91
92
97 #define AGL_VERSION 0
98 #define AGL_SUB_VERSION 4
99 #define AGL_WIP_VERSION 4
100 #define AGL_VERSION_STR "0.4.4"
101
104 /* Version Check */
105 #if (ALLEGRO_VERSION < 4 || (ALLEGRO_VERSION == 4 && ALLEGRO_SUB_VERSION < 2))
106 #error AllegroGL requires Allegro 4.2.0 or later to compile!
107 #endif
108 #ifndef GL_VERSION_1_1
109 #error AllegroGL requires OpenGL 1.1 libraries or later to compile!
110 #endif
111
112
113 #ifdef __cplusplus
114 extern "C" {
115 #endif
116
117 #ifdef ALLEGRO_WINDOWS
118
119 /* Missing #defines from Mingw */
120 #ifndef PFD_SWAP_LAYER_BUFFERS
121 #define PFD_SWAP_LAYER_BUFFERS 0x00000800
122 #endif
123
124 #ifndef PFD_GENERIC_ACCELERATED
125 #define PFD_GENERIC_ACCELERATED 0x00001000
126 #endif
127
128 #ifndef PFD_SUPPORT_DIRECTDRAW
129 #define PFD_SUPPORT_DIRECTDRAW 0x00002000
130 #endif
131
132 #ifndef CDS_FULLSCREEN
133 #define CDS_FULLSCREEN 0x00000004
134 #endif
135
136 #ifndef ENUM_CURRENT_SETTINGS
137 #define ENUM_CURRENT_SETTINGS ((DWORD)-1)
138 #endif
139
140 #endif
141
142
143 #define AGL_ERROR_SIZE 256
144 AGL_VAR(char, allegro_gl_error[AGL_ERROR_SIZE]);
145
146
156 AGL_FUNC(int, install_allegro_gl, (void));
157 AGL_FUNC(void, remove_allegro_gl, (void));
158
159 AGL_FUNC(void, allegro_gl_flip, (void));
160 AGL_FUNC(float, allegro_gl_opengl_version, (void));
161
170 #define allegro_gl_begin() ;
171
180 #define allegro_gl_end() ;
181
193 #define AGL_ALLEGRO_FORMAT 0x00000001
194
199 #define AGL_RED_DEPTH 0x00000002
200
205 #define AGL_GREEN_DEPTH 0x00000004
206
211 #define AGL_BLUE_DEPTH 0x00000008
212
218 #define AGL_ALPHA_DEPTH 0x00000010
219
223 #define AGL_COLOR_DEPTH 0x00000020
224
225
231 #define AGL_ACC_RED_DEPTH 0x00000040
232
238 #define AGL_ACC_GREEN_DEPTH 0x00000080
239
240
246 #define AGL_ACC_BLUE_DEPTH 0x00000100
247
248
254 #define AGL_ACC_ALPHA_DEPTH 0x00000200
255
260 #define AGL_DOUBLEBUFFER 0x00000400
261
269 #define AGL_STEREO 0x00000800
270
271
275 #define AGL_AUX_BUFFERS 0x00001000
276
277
282 #define AGL_Z_DEPTH 0x00002000
283
284
291 #define AGL_STENCIL_DEPTH 0x00004000
292
296 #define AGL_WINDOW_X 0x00008000
297
300 #define AGL_WINDOW_Y 0x00010000
301
310 #define AGL_RENDERMETHOD 0x00020000
311
315 #define AGL_FULLSCREEN 0x00040000
316
320 #define AGL_WINDOWED 0x00080000
321
337 #define AGL_VIDEO_MEMORY_POLICY 0x00100000
338
361 #define AGL_SAMPLE_BUFFERS 0x00200000
362
369 #define AGL_SAMPLES 0x00400000
370
375 #define AGL_FLOAT_COLOR 0x00800000
376
379 #define AGL_FLOAT_Z 0x01000000
380
381
382
383 /* XXX <rohannessian> I'm reserving 2 bits here for later expansion. DO NOT USE
384 * without consulting me first.
385 */
386 #define AGL_CONFIG_RESRVED 0xA000000
387
388
391 #define AGL_DONTCARE 0
392 #define AGL_SUGGEST -1
393 #define AGL_REQUIRE -2
394
399 #define AGL_KEEP 1
400 #define AGL_RELEASE 2
401
406 AGL_FUNC(void, allegro_gl_clear_settings, (void));
407 AGL_FUNC(void, allegro_gl_set, (int option, int value));
408 AGL_FUNC(int, allegro_gl_get, (int option));
409 AGL_FUNC(void, allegro_gl_save_settings, (void));
410 AGL_FUNC(void, allegro_gl_load_settings, (void));
427 #if defined DOXYGEN /* Is this a documentation scan? */
428
433 # define GFX_OPENGL_WINDOWED
434
435 # define GFX_OPENGL_FULLSCREEN
436
437 #define GFX_OPENGL
438
441 #else
442
443 #if defined ALLEGROGL_GENERIC_DRIVER
444 /* Allegro is able to determine at run-time if windowed or fullscreen modes
445 are available */
446 #define GFX_OPENGL_WINDOWED AL_ID('O','G','L','W')
447 #define GFX_OPENGL_FULLSCREEN AL_ID('O','G','L','F')
448
449 #else
450 #if defined _WIN32
451 /* Windows always supports fullscreen */
452 #define GFX_OPENGL_WINDOWED AL_ID('O','G','L','W')
453 #define GFX_OPENGL_FULLSCREEN AL_ID('O','G','L','F')
454
455 #elif defined ALLEGRO_WITH_XWINDOWS
456 /* X always supports fullscreen */
457 #define GFX_OPENGL_WINDOWED AL_ID('O','G','L','W')
458 #define GFX_OPENGL_FULLSCREEN AL_ID('O','G','L','F')
459
460 #elif defined ALLEGRO_MACOSX
461 /* MacOS X always supports fullscreen */
462 #define GFX_OPENGL_WINDOWED AL_ID('O','G','L','W')
463 #define GFX_OPENGL_FULLSCREEN AL_ID('O','G','L','F')
464
465 #else
466 #warning Unknown or unsupported platform.
467 #endif
468 #endif
469
470 #define GFX_OPENGL AL_ID('O','G','L','D')
471
472 #endif
473
474
475 /* Declare graphics driver objects */
476 extern GFX_DRIVER gfx_allegro_gl_default;
477 #ifdef GFX_OPENGL_WINDOWED
478 extern GFX_DRIVER gfx_allegro_gl_windowed;
479 #endif
480 #ifdef GFX_OPENGL_FULLSCREEN
481 extern GFX_DRIVER gfx_allegro_gl_fullscreen;
482 #endif
483
484
492 AGL_FUNC(GLint, allegro_gl_set_video_bitmap_color_depth, (int bpp));
504 AGL_FUNC(int, allegro_gl_use_mipmapping, (int enable));
505 AGL_FUNC(int, allegro_gl_use_alpha_channel, (int enable));
506 AGL_FUNC(int, allegro_gl_flip_texture, (int enable));
507 AGL_FUNC(int, allegro_gl_check_texture, (BITMAP *bmp));
508 AGL_FUNC(int, allegro_gl_check_texture_ex, (int flags, BITMAP *bmp,
509 GLint internal_format));
510 AGL_FUNC(GLint, allegro_gl_get_texture_format, (BITMAP *bmp));
511 AGL_FUNC(GLint, allegro_gl_set_texture_format, (GLint format));
512 AGL_FUNC(GLenum, allegro_gl_get_bitmap_type, (BITMAP *bmp));
513 AGL_FUNC(GLenum, allegro_gl_get_bitmap_color_format, (BITMAP *bmp));
514 AGL_FUNC(GLuint, allegro_gl_make_texture, (BITMAP *bmp));
515 AGL_FUNC(GLuint, allegro_gl_make_masked_texture, (BITMAP *bmp));
516 AGL_FUNC(GLuint, allegro_gl_make_texture_ex,(int flags, BITMAP *bmp,
517 GLint internal_format));
518
519
522 #define AGL_TEXTURE_MIPMAP 0x01
523
527 #define AGL_TEXTURE_HAS_ALPHA 0x02
528
533 #define AGL_TEXTURE_FLIP 0x04
534
538 #define AGL_TEXTURE_MASKED 0x08
539
544 #define AGL_TEXTURE_RESCALE 0x10
545
546
549 #define AGL_TEXTURE_ALPHA_ONLY 0x20
550
561 AGL_FUNC(void, allegro_gl_set_allegro_mode, (void));
562 AGL_FUNC(void, allegro_gl_unset_allegro_mode, (void));
563 AGL_FUNC(void, allegro_gl_set_projection, (void));
564 AGL_FUNC(void, allegro_gl_unset_projection, (void));
578 AGL_FUNC(void, allegro_gl_MATRIX_to_GLfloat, (MATRIX *m, GLfloat gl[16]));
579 AGL_FUNC(void, allegro_gl_MATRIX_to_GLdouble, (MATRIX *m, GLdouble gl[16]));
580 AGL_FUNC(void, allegro_gl_MATRIX_f_to_GLfloat, (MATRIX_f *m, GLfloat gl[16]));
581 AGL_FUNC(void, allegro_gl_MATRIX_f_to_GLdouble, (MATRIX_f *m, GLdouble gl[16]));
582
583 AGL_FUNC(void, allegro_gl_GLfloat_to_MATRIX, (GLfloat gl[16], MATRIX *m));
584 AGL_FUNC(void, allegro_gl_GLdouble_to_MATRIX, (GLdouble gl[16], MATRIX *m));
585 AGL_FUNC(void, allegro_gl_GLfloat_to_MATRIX_f, (GLfloat gl[16], MATRIX_f *m));
586 AGL_FUNC(void, allegro_gl_GLdouble_to_MATRIX_f, (GLdouble gl[16], MATRIX_f *m));
587
592 AGL_FUNC(void, allegro_gl_apply_quat, (QUAT *q));
593 AGL_FUNC(void, allegro_gl_quat_to_glrotatef, (QUAT *q, float *angle,
594 float *x, float *y, float *z));
595 AGL_FUNC(void, allegro_gl_quat_to_glrotated, (QUAT *q, double *angle,
596 double *x, double *y, double *z));
618 /* These define the supported font types */
622 #define AGL_FONT_TYPE_DONT_CARE -1
623
633 #define AGL_FONT_TYPE_BITMAP 0
634
645 #define AGL_FONT_TYPE_OUTLINE 1
646
657 #define AGL_FONT_TYPE_TEXTURED 2
658
659
660 /* These defines the font styles for system generated fonts */
665 #define AGL_FONT_STYLE_BOLD 1
666
670 #define AGL_FONT_STYLE_BLACK 2
671
675 #define AGL_FONT_STYLE_ITALIC 4
676
680 #define AGL_FONT_STYLE_UNDERLINE 8
681
685 #define AGL_FONT_STYLE_STRIKEOUT 16
686
692 #define AGL_FONT_STYLE_ANTI_ALIASED 32
693
700 #define AGL_FONT_POLYGONS 1
701
702
709 #define AGL_FONT_LINES 2
710
711
712 AGL_FUNC(int, allegro_gl_printf, (AL_CONST FONT *f, float x, float y, float z,
713 int color, AL_CONST char *format, ...));
714 AGL_FUNC(int, allegro_gl_printf_ex, (AL_CONST FONT *f, float x, float y, float z,
715 AL_CONST char *format, ...));
716 AGL_FUNC(FONT*, allegro_gl_convert_allegro_font, (FONT *f, int type, float scale));
717 AGL_FUNC(FONT*, allegro_gl_convert_allegro_font_ex, (FONT *f, int type, float scale,
718 GLint format));
719
720 AGL_FUNC(void, allegro_gl_set_font_generation_mode, (int mode));
721 AGL_FUNC(FONT*, allegro_gl_load_system_font, (char *name, int style, int w, int h));
722 AGL_FUNC(FONT*, allegro_gl_load_system_font_ex, (char *name, int type, int style,
723 int w, int h, float depth, int start, int end));
724 AGL_FUNC(void, allegro_gl_destroy_font, (FONT *f));
725 AGL_FUNC(size_t, allegro_gl_list_font_textures, (FONT *f, GLuint *ids, size_t max_num_id));
747 #if defined DOXYGEN /* Is this a documentation scan? */
748
755 #define AGL_DEFINE_PROC_TYPE
756
757 #else
758
759 AGL_FUNC(int, allegro_gl_is_extension_supported, (const char *));
760 AGL_FUNC(void*, allegro_gl_get_proc_address, (const char *));
761
762 #if defined ALLEGRO_WINDOWS
763 #define AGL_DEFINE_PROC_TYPE(type, name, args) \
764 typedef type (APIENTRY * name) args;
765 #else
766 #define AGL_DEFINE_PROC_TYPE(type, name, args) \
767 typedef type (*name) args;
768 #endif
769
770 #endif
771
793 AGL_FUNC(int, algl_do_dialog, (DIALOG *dialog, int focus_obj));
794 AGL_FUNC(int, algl_popup_dialog, (DIALOG *dialog, int focus_obj));
795 AGL_FUNC(void, algl_draw_mouse, (void));
796 AGL_FUNC(void, algl_set_mouse_drawer, (void (*user_draw_mouse)(void)));
797 AGL_FUNC(int, algl_alert, (AL_CONST char *s1, AL_CONST char *s2, AL_CONST char *s3,
798 AL_CONST char *b1, AL_CONST char *b2, int c1, int c2));
799 AGL_FUNC(int, algl_alert3, (AL_CONST char *s1, AL_CONST char *s2, AL_CONST char *s3,
800 AL_CONST char *b1, AL_CONST char *b2, AL_CONST char *b3,
801 int c1, int c2, int c3));
802 AGL_FUNC(int, d_algl_viewport_proc, (int msg, DIALOG *d, int c));
803
808 #ifdef __cplusplus
809 }
810 #endif
811
812
813 /* Fixes to MS's (or SGI?) broken GL headers */
814 #ifdef GL_VERSION_1_1
815 #ifndef GL_TEXTURE_BINDING_2D
816
817 #ifdef GL_TEXTURE_2D_BINDING
818 #define GL_TEXTURE_BINDING_2D GL_TEXTURE_2D_BINDING
819 #endif
820
821 #else
822
823 #ifdef GL_TEXTURE_BINDING_2D
824 #define GL_TEXTURE_2D_BINDING GL_TEXTURE_BINDING_2D
825 #endif
826
827 #endif
828
829 #ifndef GL_TEXTURE_BINDING_2D
830 #warning "GL_TEXTURE_BINDING_2D or GL_TEXTURE_2D_BINDING isn't defined by your"
831 #warning "OpenGL headers. Make sure you have a genuine set of headers for"
832 #warning "OpenGL 1.1 (or greater)"
833 #endif
834 #endif
835
836 #endif
837
allegro_gl_unset_projection
void allegro_gl_unset_projection(void)
Restores previously saved projection.
Definition: glvtable.c:2567
allegro_gl_printf_ex
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.
Definition: aglf.c:169
allegro_gl_opengl_version
float allegro_gl_opengl_version(void)
Returns the OpenGL version number of the client (the computer the program is running on)...
Definition: alleggl.c:971
allegro_gl_set_font_generation_mode
void allegro_gl_set_font_generation_mode(int mode)
Set the font generation mode for system fonts.
Definition: aglf.c:469
allegro_gl_load_system_font_ex
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.
Definition: aglf.c:526
allegro_gl_destroy_font
void allegro_gl_destroy_font(FONT *f)
void allegro_gl_destroy_font(FONT *usefont)
Definition: aglf.c:573
allegro_gl_GLdouble_to_MATRIX_f
void allegro_gl_GLdouble_to_MATRIX_f(GLdouble gl[16], MATRIX_f *m)
Converts an Allegro fixed-point matrix to an array of floats suitable for OpenGL&#39;s matrix operations...
allegro_gl_apply_quat
void allegro_gl_apply_quat(QUAT *q)
Converts a quaternion to a vector/angle, which can be used with glRotate*().
install_allegro_gl
int install_allegro_gl(void)
Installs the AllegroGL addon to Allegro.
Definition: alleggl.c:836
allegro_gl_make_texture_ex
GLuint allegro_gl_make_texture_ex(int flags, BITMAP *bmp, GLint internal_format)
Uploads an Allegro BITMAP to the GL driver as a texture.
Definition: texture.c:1165
d_algl_viewport_proc
int d_algl_viewport_proc(int msg, DIALOG *d, int c)
Creates a viewport object where OpenGL commands can be performed.
Definition: gui.c:477
allegro_gl_get
int allegro_gl_get(int option)
Reads the setting of a configuration option.
Definition: alleggl.c:421
allegro_gl_unset_allegro_mode
void allegro_gl_unset_allegro_mode(void)
Restores previous OpenGL settings.
Definition: glvtable.c:2491
allegro_gl_convert_allegro_font_ex
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.
Definition: fontconv.c:688
allegro_gl_list_font_textures
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.
Definition: aglf.c:689
allegro_gl_load_system_font
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...
Definition: aglf.c:485
algl_draw_mouse
void algl_draw_mouse(void)
Draws a mouse pointer on the screen.
Definition: gui.c:187
allegro_gl_get_proc_address
void * allegro_gl_get_proc_address(AL_CONST char *name)
Helper to get the address of an OpenGL symbol.
Definition: glext.c:372
allegro_gl_convert_allegro_font
FONT * allegro_gl_convert_allegro_font(FONT *f, int type, float scale)
Equivalent to:
Definition: fontconv.c:623
allegro_gl_get_texture_format
GLint allegro_gl_get_texture_format(BITMAP *bmp)
Returns the OpenGL internal texture format for this bitmap.
Definition: texture.c:248
algl_set_mouse_drawer
void algl_set_mouse_drawer(void(*user_draw_mouse)(void))
Sets (or clears) a user mouse drawing callback.
Definition: gui.c:284
allegro_gl_quat_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*().
Definition: math.c:250
allegro_gl_use_alpha_channel
int allegro_gl_use_alpha_channel(int enable)
Tell AllegroGL to use Alpha channel or not when generating textures via its functions.
Definition: texture.c:439
allegro_gl_MATRIX_f_to_GLdouble
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&#39;s matrix operati...
Definition: math.c:110
remove_allegro_gl
void remove_allegro_gl(void)
Removes the AllegroGL addon.
Definition: alleggl.c:894
allegro_gl_flip
void allegro_gl_flip(void)
Flips the front and back framebuffers.
Definition: alleggl.c:951
allegro_gl_use_mipmapping
int allegro_gl_use_mipmapping(int enable)
Tell AllegroGL to use Mipmapping or not when generating textures via its functions.
Definition: texture.c:415
allegro_gl_GLfloat_to_MATRIX
void allegro_gl_GLfloat_to_MATRIX(GLfloat gl[16], MATRIX *m)
Converts an Allegro fixed-point matrix to an array of floats suitable for OpenGL&#39;s matrix operations...
allegro_gl_save_settings
void allegro_gl_save_settings(void)
Saves the current settings (as specified by allegro_gl_set()) to the current config file...
Definition: alleggl.c:560
allegro_gl_set_projection
void allegro_gl_set_projection(void)
Prepares for Allegro drawing to the screen.
Definition: glvtable.c:2540
allegro_gl_set
void allegro_gl_set(int option, int value)
Sets a configuration option.
Definition: alleggl.c:274
allegro_gl_set_texture_format
GLint allegro_gl_set_texture_format(GLint format)
Sets the color format you&#39;d like OpenGL to use for its textures.
Definition: texture.c:282
allegro_gl_check_texture
int allegro_gl_check_texture(BITMAP *bmp)
Checks whether the specified bitmap is of the proper size for texturing.
Definition: texture.c:557
allegro_gl_flip_texture
int allegro_gl_flip_texture(int enable)
Tell AllegroGL to flip the texture vertically or not when generating textures via its functions...
Definition: texture.c:464
algl_alert
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&#39;s alert.
Definition: gui.c:449
allegro_gl_MATRIX_to_GLdouble
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&#39;s matrix operations...
Definition: math.c:82
algl_popup_dialog
int algl_popup_dialog(DIALOG *dialog, int focus_obj)
AllegroGL-friendly version of popup_dialog.
Definition: gui.c:111
allegro_gl_get_bitmap_color_format
GLenum allegro_gl_get_bitmap_color_format(BITMAP *bmp)
AllegroGL will generate mipmaps for this texture.
Definition: texture.c:1456
allegro_gl_is_extension_supported
int allegro_gl_is_extension_supported(AL_CONST char *extension)
This function is an helper to determine whether an OpenGL extension is available or not...
Definition: glext.c:306
allegro_gl_make_masked_texture
GLuint allegro_gl_make_masked_texture(BITMAP *bmp)
Uploads an Allegro BITMAP to the GL driver as a texture.
Definition: texture.c:1402
allegro_gl_check_texture_ex
int allegro_gl_check_texture_ex(int flags, BITMAP *bmp, GLint internal_format)
Checks whether the specified bitmap is of the proper size for texturing.
Definition: texture.c:495
allegro_gl_GLfloat_to_MATRIX_f
void allegro_gl_GLfloat_to_MATRIX_f(GLfloat gl[16], MATRIX_f *m)
Converts an Allegro fixed-point matrix to an array of floats suitable for OpenGL&#39;s matrix operations...
allegro_gl_set_allegro_mode
void allegro_gl_set_allegro_mode(void)
Prepares for Allegro drawing to the screen.
Definition: glvtable.c:2422
allegro_gl_make_texture
GLuint allegro_gl_make_texture(BITMAP *bmp)
Uploads an Allegro BITMAP to the GL driver as a texture.
Definition: texture.c:1383
allegro_gl_quat_to_glrotated
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*().
Definition: math.c:282
algl_do_dialog
int algl_do_dialog(DIALOG *dialog, int focus_obj)
AllegroGL-friendly version of do_dialog.
Definition: gui.c:58
allegro_gl_MATRIX_f_to_GLfloat
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&#39;s matrix operatio...
Definition: math.c:98
algl_alert3
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&#39;s alert3.
Definition: gui.c:329
allegro_gl_MATRIX_to_GLfloat
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&#39;s matrix operations...
Definition: math.c:66
allegro_gl_set_video_bitmap_color_depth
GLint allegro_gl_set_video_bitmap_color_depth(int bpp)
Sets the color depth you&#39;d like AllegroGL to use for video bitmaps.
Definition: videovtb.c:423
allegro_gl_load_settings
void allegro_gl_load_settings(void)
Loads the settings from the current config file, in the section [OpenGL].
Definition: alleggl.c:741
allegro_gl_printf
int allegro_gl_printf(AL_CONST FONT *f, float x, float y, float z, int color, AL_CONST char *format,...)
Equivalent to:
Definition: aglf.c:67
allegro_gl_get_bitmap_type
GLenum allegro_gl_get_bitmap_type(BITMAP *bmp)
AllegroGL will generate mipmaps for this texture.
Definition: texture.c:1433
allegro_gl_GLdouble_to_MATRIX
void allegro_gl_GLdouble_to_MATRIX(GLdouble gl[16], MATRIX *m)
Converts an Allegro fixed-point matrix to an array of floats suitable for OpenGL&#39;s matrix operations...