17 #include <allegro/internal/aintern.h> 19 #include <OpenGL/glu.h> 24 #define PREFIX_I "agl INFO: " 25 #define PREFIX_E "agl ERROR: " 26 #define PREFIX_L "agl LOG: " 30 struct allegro_gl_driver *__allegro_gl_driver = NULL;
31 struct allegro_gl_display_info allegro_gl_display_info;
34 int __allegro_gl_required_settings, __allegro_gl_suggested_settings;
37 int __allegro_gl_valid_context = 0;
41 int __allegro_gl_blit_operation;
44 char allegro_gl_error[AGL_ERROR_SIZE] = EMPTY_STRING;
46 BLIT_BETWEEN_FORMATS_FUNC __blit_between_formats8;
47 BLIT_BETWEEN_FORMATS_FUNC __blit_between_formats15;
48 BLIT_BETWEEN_FORMATS_FUNC __blit_between_formats16;
49 BLIT_BETWEEN_FORMATS_FUNC __blit_between_formats24;
50 BLIT_BETWEEN_FORMATS_FUNC __blit_between_formats32;
67 static _DRIVER_INFO our_driver_list[] = {
68 #ifdef GFX_OPENGL_WINDOWED 71 #ifdef GFX_OPENGL_FULLSCREEN 80 static _DRIVER_INFO *our_gfx_drivers(
void)
82 return our_driver_list;
87 _DRIVER_INFO *(*saved_gfx_drivers) (void) = NULL;
91 static _DRIVER_INFO *list_saved_gfx_drivers(
void)
93 return _gfx_driver_list;
98 static BITMAP *allegro_gl_default_gfx_init(
int w,
int h,
int vw,
int vh,
int depth);
102 GFX_DRIVER gfx_allegro_gl_default =
107 "AllegroGL Default Driver",
108 allegro_gl_default_gfx_init,
118 NULL, NULL, NULL, NULL,
195 memset(&allegro_gl_display_info, 0,
sizeof allegro_gl_display_info);
197 __allegro_gl_required_settings = __allegro_gl_suggested_settings = 0;
200 allegro_gl_display_info.fullscreen = 1;
201 allegro_gl_display_info.rmethod = 1;
202 allegro_gl_display_info.doublebuffered = 1;
203 allegro_gl_display_info.vidmem_policy =
AGL_KEEP;
204 __allegro_gl_suggested_settings =
279 __allegro_gl_required_settings |= value;
280 __allegro_gl_suggested_settings &= ~value;
283 __allegro_gl_suggested_settings |= value;
284 __allegro_gl_required_settings &= ~value;
287 __allegro_gl_required_settings &= ~value;
288 __allegro_gl_suggested_settings &= ~value;
293 allegro_gl_display_info.allegro_format = value;
296 allegro_gl_display_info.pixel_size.rgba.r = value;
299 allegro_gl_display_info.pixel_size.rgba.g = value;
302 allegro_gl_display_info.pixel_size.rgba.b = value;
305 allegro_gl_display_info.pixel_size.rgba.a = value;
335 allegro_gl_display_info.colour_depth = value;
338 allegro_gl_display_info.accum_size.rgba.r = value;
341 allegro_gl_display_info.accum_size.rgba.g = value;
344 allegro_gl_display_info.accum_size.rgba.b = value;
347 allegro_gl_display_info.accum_size.rgba.a = value;
351 allegro_gl_display_info.doublebuffered = value;
354 allegro_gl_display_info.stereo = value;
357 allegro_gl_display_info.aux_buffers = value;
360 allegro_gl_display_info.depth_size = value;
363 allegro_gl_display_info.stencil_size = value;
367 allegro_gl_display_info.x = value;
370 allegro_gl_display_info.y = value;
374 allegro_gl_display_info.rmethod = value;
378 allegro_gl_display_info.fullscreen = value;
382 allegro_gl_display_info.fullscreen = !value;
386 allegro_gl_display_info.vidmem_policy = value;
389 allegro_gl_display_info.sample_buffers = value;
392 allegro_gl_display_info.samples = value;
395 allegro_gl_display_info.float_color = value;
398 allegro_gl_display_info.float_depth = value;
426 return __allegro_gl_required_settings;
428 return __allegro_gl_suggested_settings;
430 return ~0 & ~(__allegro_gl_required_settings |
431 __allegro_gl_suggested_settings);
435 return allegro_gl_display_info.allegro_format;
437 return allegro_gl_display_info.pixel_size.rgba.r;
439 return allegro_gl_display_info.pixel_size.rgba.g;
441 return allegro_gl_display_info.pixel_size.rgba.b;
443 return allegro_gl_display_info.pixel_size.rgba.a;
445 return allegro_gl_display_info.pixel_size.rgba.r
446 + allegro_gl_display_info.pixel_size.rgba.g
447 + allegro_gl_display_info.pixel_size.rgba.b
448 + allegro_gl_display_info.pixel_size.rgba.a;
450 return allegro_gl_display_info.accum_size.rgba.r;
452 return allegro_gl_display_info.accum_size.rgba.g;
454 return allegro_gl_display_info.accum_size.rgba.b;
456 return allegro_gl_display_info.accum_size.rgba.a;
458 return allegro_gl_display_info.doublebuffered;
460 return allegro_gl_display_info.stereo;
462 return allegro_gl_display_info.aux_buffers;
464 return allegro_gl_display_info.depth_size;
466 return allegro_gl_display_info.stencil_size;
468 return allegro_gl_display_info.x;
470 return allegro_gl_display_info.y;
472 return allegro_gl_display_info.fullscreen;
474 return !allegro_gl_display_info.fullscreen;
476 return allegro_gl_display_info.vidmem_policy;
478 return allegro_gl_display_info.sample_buffers;
480 return allegro_gl_display_info.samples;
482 return allegro_gl_display_info.float_color;
484 return allegro_gl_display_info.float_depth;
494 static void build_settings(
int opt,
char *section,
char *name) {
500 ustrcat(buf,
"allegro_format ");
502 ustrcat(buf,
"red_depth ");
504 ustrcat(buf,
"green_depth ");
506 ustrcat(buf,
"blue_depth ");
508 ustrcat(buf,
"alpha_depth ");
510 ustrcat(buf,
"color_depth ");
512 ustrcat(buf,
"accum_red_depth ");
514 ustrcat(buf,
"accum_green_depth ");
516 ustrcat(buf,
"accum_blue_depth ");
518 ustrcat(buf,
"accum_alpha_depth ");
520 ustrcat(buf,
"double_buffer ");
522 ustrcat(buf,
"stereo_display ");
524 ustrcat(buf,
"aux_buffers ");
526 ustrcat(buf,
"z_depth ");
528 ustrcat(buf,
"stencil_depth ");
530 ustrcat(buf,
"window_x ");
532 ustrcat(buf,
"window_y ");
534 ustrcat(buf,
"fullscreen ");
536 ustrcat(buf,
"windowed ");
538 ustrcat(buf,
"video_memory_policy ");
540 ustrcat(buf,
"sample_buffers ");
542 ustrcat(buf,
"samples ");
544 ustrcat(buf,
"float_color ");
546 ustrcat(buf,
"float_depth ");
548 set_config_string(section, name, buf);
562 char *section =
"OpenGL";
566 set_config_int(section,
"allegro_format",
569 set_config_int(section,
"red_depth",
572 set_config_int(section,
"green_depth",
575 set_config_int(section,
"blue_depth",
578 set_config_int(section,
"alpha_depth",
581 set_config_int(section,
"color_depth",
584 set_config_int(section,
"accum_red_depth",
587 set_config_int(section,
"accum_green_depth",
590 set_config_int(section,
"accum_blue_depth",
593 set_config_int(section,
"accum_alpha_depth",
596 set_config_int(section,
"double_buffer",
599 set_config_int(section,
"stereo_display",
602 set_config_int(section,
"aux_buffers",
605 set_config_int(section,
"z_depth",
608 set_config_int(section,
"stencil_depth",
611 set_config_int(section,
"window_x",
614 set_config_int(section,
"window_y",
617 set_config_int(section,
"fullscreen",
620 set_config_int(section,
"windowed",
623 set_config_int(section,
"video_memory_policy",
626 set_config_int(section,
"sample_buffers",
629 set_config_int(section,
"samples",
632 set_config_int(section,
"float_color",
635 set_config_int(section,
"float_depth",
647 static void agl_parse_section(
int sec,
char *section,
char *name) {
654 end = get_config_string(section, name,
"");
655 strsize = ustrsizez(end);
657 buf = (
char*)malloc(
sizeof(
char) * strsize);
660 TRACE(PREFIX_E
"parse_section: Ran out of memory " 661 "while trying to allocate %i bytes!",
662 (
int)
sizeof(
char) * strsize);
666 memcpy(buf, end, strsize);
671 char *s = ustrtok_r(ptr,
" ;|+", &ptr);
673 if (!ustrcmp(s,
"allegro_format"))
675 if (!ustrcmp(s,
"red_depth"))
677 if (!ustrcmp(s,
"green_depth"))
679 if (!ustrcmp(s,
"blue_depth"))
681 if (!ustrcmp(s,
"alpha_depth"))
683 if (!ustrcmp(s,
"color_depth"))
685 if (!ustrcmp(s,
"accum_red_depth"))
687 if (!ustrcmp(s,
"accum_green_depth"))
689 if (!ustrcmp(s,
"accum_blue_depth"))
691 if (!ustrcmp(s,
"accum_alpha_depth"))
693 if (!ustrcmp(s,
"double_buffer"))
695 if (!ustrcmp(s,
"stereo_display"))
697 if (!ustrcmp(s,
"aux_buffers"))
699 if (!ustrcmp(s,
"z_depth"))
701 if (!ustrcmp(s,
"stencil_depth"))
703 if (!ustrcmp(s,
"window_x"))
705 if (!ustrcmp(s,
"window_y"))
707 if (!ustrcmp(s,
"fullscreen"))
709 if (!ustrcmp(s,
"windowed"))
711 if (!ustrcmp(s,
"video_memory_policy"))
713 if (!ustrcmp(s,
"sample_buffers"))
715 if (!ustrcmp(s,
"samples"))
717 if (!ustrcmp(s,
"float_color"))
719 if (!ustrcmp(s,
"float_depth"))
744 char *section =
"OpenGL";
746 set = get_config_int(section,
"allegro_format", -1);
749 set = get_config_int(section,
"red_depth", -1);
752 set = get_config_int(section,
"green_depth", -1);
755 set = get_config_int(section,
"blue_depth", -1);
758 set = get_config_int(section,
"alpha_depth", -1);
761 set = get_config_int(section,
"color_depth", -1);
764 set = get_config_int(section,
"accum_red_depth", -1);
767 set = get_config_int(section,
"accum_green_depth", -1);
770 set = get_config_int(section,
"accum_blue_depth", -1);
773 set = get_config_int(section,
"accum_alpha_depth", -1);
776 set = get_config_int(section,
"double_buffer", -1);
779 set = get_config_int(section,
"stereo_display", -1);
782 set = get_config_int(section,
"aux_buffers", -1);
785 set = get_config_int(section,
"z_depth", -1);
788 set = get_config_int(section,
"stencil_depth", -1);
791 set = get_config_int(section,
"window_x", -1);
794 set = get_config_int(section,
"window_y", -1);
797 set = get_config_int(section,
"fullscreen", -1);
800 set = get_config_int(section,
"windowed", -1);
803 set = get_config_int(section,
"video_memory_policy", -1);
806 set = get_config_int(section,
"sample_buffers", -1);
809 set = get_config_int(section,
"samples", -1);
812 set = get_config_int(section,
"float_color", -1);
815 set = get_config_int(section,
"float_depth", -1);
819 agl_parse_section(
AGL_REQUIRE, section,
"require");
820 agl_parse_section(
AGL_SUGGEST, section,
"suggest");
844 if (system_driver->gfx_drivers)
845 saved_gfx_drivers = system_driver->gfx_drivers;
847 saved_gfx_drivers = list_saved_gfx_drivers;
849 system_driver->gfx_drivers = our_gfx_drivers;
854 #ifdef ALLEGRO_COLOR8 855 __blit_between_formats8 = __linear_vtable8.blit_between_formats;
856 __linear_vtable8.blit_between_formats =
857 allegro_gl_memory_blit_between_formats;
859 #ifdef ALLEGRO_COLOR16 860 __blit_between_formats15 = __linear_vtable15.blit_between_formats;
861 __linear_vtable15.blit_between_formats =
862 allegro_gl_memory_blit_between_formats;
863 __blit_between_formats16 = __linear_vtable16.blit_between_formats;
864 __linear_vtable16.blit_between_formats
865 = allegro_gl_memory_blit_between_formats;
867 #ifdef ALLEGRO_COLOR24 868 __blit_between_formats24 = __linear_vtable24.blit_between_formats;
869 __linear_vtable24.blit_between_formats
870 = allegro_gl_memory_blit_between_formats;
872 #ifdef ALLEGRO_COLOR32 873 __blit_between_formats32 = __linear_vtable32.blit_between_formats;
874 __linear_vtable32.blit_between_formats
875 = allegro_gl_memory_blit_between_formats;
878 usetc(allegro_gl_error, 0);
896 if ((!system_driver) || (!saved_gfx_drivers))
899 if (saved_gfx_drivers == &list_saved_gfx_drivers)
900 system_driver->gfx_drivers = NULL;
902 system_driver->gfx_drivers = saved_gfx_drivers;
908 saved_gfx_drivers = NULL;
911 #ifdef ALLEGRO_COLOR8 912 __linear_vtable8.blit_between_formats = __blit_between_formats8;
914 #ifdef ALLEGRO_COLOR16 915 __linear_vtable15.blit_between_formats = __blit_between_formats15;
916 __linear_vtable16.blit_between_formats = __blit_between_formats16;
918 #ifdef ALLEGRO_COLOR24 919 __linear_vtable24.blit_between_formats = __blit_between_formats24;
921 #ifdef ALLEGRO_COLOR32 922 __linear_vtable32.blit_between_formats = __blit_between_formats32;
953 __allegro_gl_driver->flip();
975 if (!__allegro_gl_valid_context)
978 str = (
const char*)glGetString(GL_VERSION);
980 if ((strncmp(str,
"1.0 ", 4) == 0) || (strncmp(str,
"1.0.0 ", 6) == 0))
982 if ((strncmp(str,
"1.1 ", 4) == 0) || (strncmp(str,
"1.1.0 ", 6) == 0))
984 if ((strncmp(str,
"1.2 ", 4) == 0) || (strncmp(str,
"1.2.0 ", 6) == 0))
986 if ((strncmp(str,
"1.2.1 ", 6) == 0))
988 if ((strncmp(str,
"1.2.2 ", 6) == 0))
990 if ((strncmp(str,
"1.3 ", 4) == 0) || (strncmp(str,
"1.3.0 ", 6) == 0))
992 if ((strncmp(str,
"1.4 ", 4) == 0) || (strncmp(str,
"1.4.0 ", 6) == 0))
994 if ((strncmp(str,
"1.5 ", 4) == 0) || (strncmp(str,
"1.5.0 ", 6) == 0))
996 if ((strncmp(str,
"2.0 ", 4) == 0) || (strncmp(str,
"2.0.0 ", 6) == 0))
998 if ((strncmp(str,
"2.1 ", 4) == 0) || (strncmp(str,
"2.1.0 ", 6) == 0))
1000 if ((strncmp(str,
"3.0 ", 4) == 0) || (strncmp(str,
"3.0.0 ", 6) == 0))
1015 void __allegro_gl_set_allegro_image_format(
int big_endian)
1018 _rgb_r_shift_15 = 11;
1019 _rgb_g_shift_15 = 6;
1020 _rgb_b_shift_15 = 1;
1022 _rgb_r_shift_16 = 11;
1023 _rgb_g_shift_16 = 5;
1024 _rgb_b_shift_16 = 0;
1027 _rgb_r_shift_24 = 16;
1028 _rgb_g_shift_24 = 8;
1029 _rgb_b_shift_24 = 0;
1031 _rgb_a_shift_32 = 0;
1032 _rgb_r_shift_32 = 24;
1033 _rgb_g_shift_32 = 16;
1034 _rgb_b_shift_32 = 8;
1037 _rgb_r_shift_24 = 0;
1038 _rgb_g_shift_24 = 8;
1039 _rgb_b_shift_24 = 16;
1041 _rgb_r_shift_32 = 0;
1042 _rgb_g_shift_32 = 8;
1043 _rgb_b_shift_32 = 16;
1044 _rgb_a_shift_32 = 24;
1057 static BITMAP *allegro_gl_default_gfx_init(
int w,
int h,
int vw,
int vh,
1062 if (allegro_gl_display_info.fullscreen) {
1063 TRACE(PREFIX_I
"default_gfx_init: Trying to set up fullscreen mode.\n");
1065 #ifdef GFX_OPENGL_FULLSCREEN 1067 gfx_driver = &gfx_allegro_gl_fullscreen;
1071 return gfx_allegro_gl_fullscreen.init(w, h, vw, vh, depth);
1073 bmp = gfx_allegro_gl_fullscreen.init(w, h, vw, vh, depth);
1084 TRACE(PREFIX_I
"default_gfx_init: Failed to set up fullscreen mode!\n");
1085 #ifdef GFX_OPENGL_WINDOWED 1086 TRACE(PREFIX_I
"default_gfx_init: Trying windowed mode...\n");
1087 allegro_gl_display_info.fullscreen = FALSE;
1088 gfx_driver = &gfx_allegro_gl_windowed;
1089 return gfx_allegro_gl_windowed.init(w, h, vw, vh, depth);
1095 TRACE(PREFIX_I
"default_gfx_init: Trying to set up windowed mode...\n");
1097 #ifdef GFX_OPENGL_WINDOWED 1099 gfx_driver = &gfx_allegro_gl_windowed;
1103 return gfx_allegro_gl_windowed.init(w, h, vw, vh, depth);
1105 bmp = gfx_allegro_gl_windowed.init(w, h, vw, vh, depth);
1116 TRACE(PREFIX_I
"default_gfx_init: Failed to set up windowed mode...\n");
1117 #ifdef GFX_OPENGL_FULLSCREEN 1118 TRACE(PREFIX_I
"default_gfx_init: Trying fullscreen mode...\n");
1119 allegro_gl_display_info.fullscreen = TRUE;
1120 gfx_driver = &gfx_allegro_gl_fullscreen;
1121 return gfx_allegro_gl_fullscreen.init(w, h, vw, vh, depth);
1133 void allegro_gl_set_blender_mode(
int mode,
int r,
int g,
int b,
int a) {
1134 __allegro_gl_blit_operation = AGL_OP_BLEND;
1139 case blender_mode_none:
1140 glBlendFunc(GL_ONE, GL_ZERO);
1142 case blender_mode_alpha:
1143 glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
1145 case blender_mode_invert:
1146 glLogicOp(GL_COPY_INVERTED);
1147 __allegro_gl_blit_operation = AGL_OP_LOGIC_OP;
1149 case blender_mode_multiply:
1150 glBlendFunc(GL_DST_COLOR, GL_ZERO);
1159 glBlendColor(r / 255.f, g / 255.f, b / 255.f, a / 255.f);
1162 case blender_mode_none:
1163 glBlendEquation(GL_FUNC_ADD);
1165 case blender_mode_alpha:
1166 glBlendEquation(GL_FUNC_ADD);
1168 case blender_mode_trans:
1169 glBlendEquation(GL_FUNC_ADD);
1170 glBlendFunc(GL_CONSTANT_ALPHA, GL_ONE_MINUS_CONSTANT_ALPHA);
1172 case blender_mode_add:
1173 glBlendEquation(GL_FUNC_ADD);
1174 glBlendFunc(GL_CONSTANT_ALPHA, GL_ONE);
1176 case blender_mode_burn:
1177 glBlendEquation(GL_FUNC_SUBTRACT);
1178 glBlendFunc(GL_ONE, GL_CONSTANT_ALPHA);
1180 case blender_mode_dodge:
1181 glBlendEquation(GL_FUNC_ADD);
1182 glBlendFunc(GL_ONE, GL_CONSTANT_ALPHA);
1184 case blender_mode_multiply:
1185 glBlendEquation(GL_FUNC_ADD);
1195 glBlendColorEXT(r / 255.f, g / 255.f, b / 255.f, a / 255.f);
1198 case blender_mode_trans:
1199 glBlendFunc(GL_CONSTANT_ALPHA_EXT, GL_ONE_MINUS_CONSTANT_ALPHA_EXT);
1201 case blender_mode_add:
1202 glBlendFunc(GL_CONSTANT_ALPHA_EXT, GL_ONE);
1204 case blender_mode_burn:
1205 glBlendFunc(GL_ONE, GL_CONSTANT_ALPHA_EXT);
1207 case blender_mode_dodge:
1208 glBlendFunc(GL_ONE, GL_CONSTANT_ALPHA_EXT);
1212 else if (mode == blender_mode_trans ||
1213 mode == blender_mode_add ||
1214 mode == blender_mode_burn ||
1215 mode == blender_mode_dodge) {
1224 case blender_mode_none:
1225 glBlendEquationEXT(GL_FUNC_ADD_EXT);
1227 case blender_mode_alpha:
1228 glBlendEquationEXT(GL_FUNC_ADD_EXT);
1230 case blender_mode_trans:
1231 glBlendEquationEXT(GL_FUNC_ADD_EXT);
1233 case blender_mode_add:
1234 glBlendEquationEXT(GL_FUNC_ADD_EXT);
1236 case blender_mode_dodge:
1237 glBlendEquationEXT(GL_FUNC_ADD_EXT);
1239 case blender_mode_multiply:
1240 glBlendEquationEXT(GL_FUNC_ADD_EXT);
1242 case blender_mode_burn:
1244 glBlendEquationEXT(GL_FUNC_SUBTRACT_EXT);
1260 void __allegro_gl_log(
int level,
const char *str)
1262 if (level <= LOGLEVEL)
1263 TRACE(PREFIX_L
"[%d] %s", level, str);
#define AGL_KEEP
Keep internal texture in video memory.
#define AGL_SAMPLE_BUFFERS
Define multisample parameters Some OpenGL ICDs expose an extension called GL_ARB_multisample which pr...
#define GFX_OPENGL_FULLSCREEN
Fullscreen OpenGL graphics driver for Allegro.
#define AGL_GREEN_DEPTH
Select the green depth of the frame buffer.
float allegro_gl_opengl_version()
Returns the OpenGL version number of the client (the computer the program is running on)...
#define AGL_STEREO
Creates seperate left/right buffers for stereo display.
#define AGL_REQUIRE
Reject other values for these settings.
#define AGL_DOUBLEBUFFER
Creates a backbuffer if set.
int install_allegro_gl(void)
Installs the AllegroGL addon to Allegro.
int allegro_gl_get(int option)
Reads the setting of a configuration option.
#define AGL_ALPHA_DEPTH
Select the alpha depth of the frame buffer.
#define AGL_SUGGEST
Prefer the assigned values for these settings.
#define AGL_SAMPLES
Define multisample samples Set this value to the number of samples that can be accepted in the multis...
#define AGL_VIDEO_MEMORY_POLICY
Define AllegroGL's policy relative to video memory usage.
void allegro_gl_clear_settings(void)
Clear the option settings All settings are set to their default values, and marked as neither suggest...
#define AGL_FULLSCREEN
Set if you'd like a full screen mode.
void remove_allegro_gl(void)
Removes the AllegroGL addon.
#define AGL_ACC_BLUE_DEPTH
Select the blue depth of the accumulator buffer.
void allegro_gl_flip(void)
Flips the front and back framebuffers.
#define AGL_ACC_ALPHA_DEPTH
Select the alpha depth of the accumulator buffer.
void allegro_gl_save_settings(void)
Saves the current settings (as specified by allegro_gl_set()) to the current config file...
#define AGL_ACC_GREEN_DEPTH
Select the green depth of the accumulator buffer.
#define AGL_ALLEGRO_FORMAT
Use Allegro-compatible framebuffer.
void allegro_gl_set(int option, int value)
Sets a configuration option.
#define AGL_Z_DEPTH
Select the depth of the z-buffer.
#define AGL_STENCIL_DEPTH
Select the depth of the stencil buffer.
#define AGL_FLOAT_COLOR
Floating-point Color buffer.
#define AGL_WINDOW_X
Requests a placement of the window to a specified pixel location.
#define GFX_OPENGL
Non-specific OpenGL graphics driver for Allegro.
#define AGL_DONTCARE
Ignore these settings.
#define AGL_WINDOW_Y
Same as AGL_WINDOW_X, but for the y-axis.
#define AGL_COLOR_DEPTH
Specify the total color depth of the frame buffer.
#define AGL_FLOAT_Z
Floating-point Depth buffer.
#define AGL_AUX_BUFFERS
Creates additional auxiliary buffers.
#define GFX_OPENGL_WINDOWED
Windowed OpenGL graphics driver for Allegro.
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...
#define AGL_ACC_RED_DEPTH
Select the red depth of the accumulator buffer.
Main header file for AllegroGL.
#define AGL_BLUE_DEPTH
Select the blue depth of the frame buffer.
BITMAP * allegro_gl_screen
Direct-mode GL `screen' bitmap.
#define AGL_WINDOWED
Set if you'd like a windowed mode.
#define AGL_RED_DEPTH
Select the red depth of the frame buffer.
#define AGL_RELEASE
Release video memory occupied by internal texture.
#define AGL_RENDERMETHOD
Set it if you'd like AllegroGL to pay special attention on whether hardware acceleration is present o...
void allegro_gl_load_settings(void)
Loads the settings from the current config file, in the section [OpenGL].