AllegroGL has functions to set particular options, and to state whether choices are merely preferences or are essential.
Use allegro_gl_set() to set options. All options are integers. The value you set is, by default, ignored; you must tell AllegroGL how important it is. There are three levels of importance:
To specify the importance of a setting, set AGL_REQUIRE, AGL_SUGGEST, or AGL_DONTCARE to contain that setting's flag, e.g.
allegro_gl_set(AGL_COLOR_DEPTH, 16); allegro_gl_set(AGL_REQUIRE, AGL_COLOR_DEPTH);
Rather than calling allegro_gl_set once per setting you want to mark as required, you can OR the setting flags together:
allegro_gl_set(AGL_REQUIRE, AGL_COLOR_DEPTH | AGL_DOUBLEBUFFER);
This has the same effect as marking the two settings separately.
After saying that you AGL_REQUIRE a particular setting, you can still go back and AGL_DONTCARE or AGL_SUGGEST it instead -- nothing happens until you try to set a graphics mode. At that stage, a mode is set (or set_gfx_mode() returns failure, if not all required settings could be satisfied), and you can then retrieve the actual settings used by calling allegro_gl_get(). Note that this is largely untested; some settings may not be retrieved properly. Please do let us know if you find any!
|
Use Allegro-compatible framebuffer.
Definition at line 158 of file alleggl.h. Referenced by agl_parse_section(), allegro_gl_get(), allegro_gl_load_settings(), allegro_gl_save_settings(), allegro_gl_set(), and build_settings(). |
|
Select the red depth of the frame buffer. This defines the number of bits for the red component you'd like. The driver may or may not find a suitable mode Definition at line 164 of file alleggl.h. Referenced by __allegro_gl_fill_in_info(), agl_parse_section(), allegro_gl_get(), allegro_gl_load_settings(), allegro_gl_save_settings(), allegro_gl_set(), build_settings(), and get_score(). |
|
Select the green depth of the frame buffer. This defines the number of bits for the green component you'd like. The driver may or may not find a suitable mode Definition at line 170 of file alleggl.h. Referenced by __allegro_gl_fill_in_info(), agl_parse_section(), allegro_gl_get(), allegro_gl_load_settings(), allegro_gl_save_settings(), allegro_gl_set(), build_settings(), and get_score(). |
|
Select the blue depth of the frame buffer. This defines the number of bits for the blue component you'd like. The driver may or may not find a suitable mode Definition at line 176 of file alleggl.h. Referenced by __allegro_gl_fill_in_info(), agl_parse_section(), allegro_gl_get(), allegro_gl_load_settings(), allegro_gl_save_settings(), allegro_gl_set(), build_settings(), and get_score(). |
|
Select the alpha depth of the frame buffer. This defines the number of bits for the alpha component you'd like. Not many video cards support destination alpha, so be aware that the you may not get an alpha depth at all. Definition at line 183 of file alleggl.h. Referenced by __allegro_gl_fill_in_info(), agl_parse_section(), allegro_gl_get(), allegro_gl_load_settings(), allegro_gl_save_settings(), allegro_gl_set(), build_settings(), and get_score(). |
|
Specify the total color depth of the frame buffer. The driver is free to select any combination of red, green, blue and alpha bits. Definition at line 188 of file alleggl.h. Referenced by __allegro_gl_fill_in_info(), agl_parse_section(), allegro_gl_get(), allegro_gl_load_settings(), allegro_gl_save_settings(), allegro_gl_set(), build_settings(), and get_score(). |
|
Select the red depth of the accumulator buffer. This defines the number of bits to use for the red component. The driver may or may not find a suitable mode. Note that on many video cards, the accumulator buffer is not accelerated. Definition at line 196 of file alleggl.h. Referenced by agl_parse_section(), allegro_gl_get(), allegro_gl_load_settings(), allegro_gl_save_settings(), allegro_gl_set(), build_settings(), and get_score(). |
|
Select the green depth of the accumulator buffer. This defines the number of bits to use for the green component. The driver may or may not find a suitable mode. Note that on many video cards, the accumulator buffer is not accelerated. Definition at line 203 of file alleggl.h. Referenced by agl_parse_section(), allegro_gl_get(), allegro_gl_load_settings(), allegro_gl_save_settings(), allegro_gl_set(), build_settings(), and get_score(). |
|
Select the blue depth of the accumulator buffer. This defines the number of bits to use for the blue component. The driver may or may not find a suitable mode. Note that on many video cards, the accumulator buffer is not accelerated. Definition at line 211 of file alleggl.h. Referenced by agl_parse_section(), allegro_gl_get(), allegro_gl_load_settings(), allegro_gl_save_settings(), allegro_gl_set(), build_settings(), and get_score(). |
|
Select the alpha depth of the accumulator buffer. This defines the number of bits to use for the alpha component. The driver may or may not find a suitable mode. Note that on many video cards, the accumulator buffer is not accelerated. Not many cards support destination alpha either. Definition at line 219 of file alleggl.h. Referenced by agl_parse_section(), allegro_gl_get(), allegro_gl_load_settings(), allegro_gl_save_settings(), allegro_gl_set(), build_settings(), and get_score(). |
|
Creates a backbuffer if set. The buffering mode may be double buffering or page flipping, depending on the driver settings. OpenGL programs cannot chose the buffering mode themselves. Definition at line 225 of file alleggl.h. Referenced by __allegro_gl_fill_in_info(), agl_parse_section(), allegro_gl_clear_settings(), allegro_gl_get(), allegro_gl_load_settings(), allegro_gl_save_settings(), allegro_gl_set(), build_settings(), and get_score(). |
|
Creates seperate left/right buffers for stereo display. Stereo display is used with special hardware (tipically glasses) for giving the illusion of depth by drawing the left and right buffers with a slight horizontal displacement. This makes the display appear to heavily flicker without the special hardware. Set to TRUE for enabling stereo viewing. Definition at line 234 of file alleggl.h. Referenced by __allegro_gl_fill_in_info(), agl_parse_section(), allegro_gl_get(), allegro_gl_load_settings(), allegro_gl_save_settings(), allegro_gl_set(), build_settings(), and get_score(). |
|
Creates additional auxiliary buffers. This allows you to have more than one rendering context. Few video cards support this feature. Definition at line 240 of file alleggl.h. Referenced by agl_parse_section(), allegro_gl_get(), allegro_gl_load_settings(), allegro_gl_save_settings(), allegro_gl_set(), build_settings(), and get_score(). |
|
Select the depth of the z-buffer. The z-buffer is used to properly display polygons in 3D without recurring to sorting. The higher the depth of the z-buffer, the more precise it is. Definition at line 247 of file alleggl.h. Referenced by agl_parse_section(), allegro_gl_get(), allegro_gl_load_settings(), allegro_gl_save_settings(), allegro_gl_set(), build_settings(), and get_score(). |
|
Select the depth of the stencil buffer. The stencil buffer is used to to do per-pixel testing (like the z-buffer), but of an arbitrary pattern instead of depth. Please see the OpenGL documentation for details. Newer cards support stenciling in hardware, but older cards (TNT2s, Voodoos, ATI Rage) do not. Definition at line 256 of file alleggl.h. Referenced by agl_parse_section(), allegro_gl_get(), allegro_gl_load_settings(), allegro_gl_save_settings(), allegro_gl_set(), build_settings(), and get_score(). |
|
Requests a placement of the window to a specified pixel location. The driver may or may not honnor the request. Definition at line 261 of file alleggl.h. Referenced by agl_parse_section(), allegro_gl_get(), allegro_gl_load_settings(), allegro_gl_save_settings(), allegro_gl_set(), and build_settings(). |
|
Set it if you'd like AllegroGL to pay special attention on whether hardware acceleration is present or not. Notice however this isn't a guarentee that the OpenGL operations will be accelerated, but rather a request that the operations go through the video card's drivers instead of Microsoft's software renderer. The video card driver is free to drop back to software mode if it deems it necessary. This setting has no effect in X. Definition at line 275 of file alleggl.h. Referenced by allegro_gl_clear_settings(), allegro_gl_set(), and get_score(). |
|
Set if you'd like a full screen mode. Full screen may or may not be available on the current platform. Definition at line 280 of file alleggl.h. Referenced by agl_parse_section(), allegro_gl_clear_settings(), allegro_gl_default_gfx_init(), allegro_gl_get(), allegro_gl_load_settings(), allegro_gl_save_settings(), allegro_gl_set(), and build_settings(). |
|
Set if you'd like a windowed mode. Windowed modes may or may not be available on the current platform. Definition at line 285 of file alleggl.h. Referenced by agl_parse_section(), allegro_gl_default_gfx_init(), allegro_gl_get(), allegro_gl_load_settings(), allegro_gl_save_settings(), allegro_gl_set(), and build_settings(). |
|
Define AllegroGL's policy relative to video memory usage. Sometimes AllegroGL needs to create an internal 256x256 texture in order to perform graphics operations like masked_blit, draw_sprite and so on. This parameter defines the policy of AllegroGL relative to the management of this texture. Several options are available :
Definition at line 302 of file alleggl.h. Referenced by agl_parse_section(), allegro_gl_get(), allegro_gl_load_settings(), allegro_gl_save_settings(), allegro_gl_set(), and build_settings(). |
|
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. In order to get an AllegroGL mode which supports multisample, you have to set both AGL_SAMPLE_BUFFERS to 1 and AGL_SAMPLES to the number of desired samples for multisampling. Notice however that since this feature relies on several extensions (GL_ARB_multisample and GLX_ARB_multisample or WGL_ARB_multisample), it isn't guaranteed that AllegroGL will find a graphics mode that supports multisample : many not-so-old video cards, like the GeForce 2, do not support multisampling Hence, if you want your app to be able to run on most platforms, you should not require this parameter. Set this value to 1 to enable multisampling.
Definition at line 326 of file alleggl.h. Referenced by __allegro_gl_fill_in_info(), agl_parse_section(), allegro_gl_get(), allegro_gl_load_settings(), allegro_gl_save_settings(), allegro_gl_set(), build_settings(), and get_score(). |
|
Define multisample samples Set this value to the number of samples that can be accepted in the multisample buffers.
Definition at line 334 of file alleggl.h. Referenced by __allegro_gl_fill_in_info(), agl_parse_section(), allegro_gl_get(), allegro_gl_load_settings(), allegro_gl_save_settings(), allegro_gl_set(), build_settings(), and get_score(). |
|
Clear the option settings All settings are set to their default values, and marked as neither suggested not required. The mode setting routines will now ignore all of the settings other than those which you explicitly mark with AGL_SUGGEST or AGL_REQUIRE.
Definition at line 185 of file alleggl.c. References __allegro_gl_required_settings, __allegro_gl_suggested_settings, AGL_DOUBLEBUFFER, AGL_FULLSCREEN, AGL_KEEP, AGL_RENDERMETHOD, and allegro_gl_display_info. Referenced by install_allegro_gl(). |
|
|
Reads the setting of a configuration option. This routine can be used to read back the configuration of the framebuffer. You can do this either before setting a graphics mode to check what configuration you are requesting, or afterwards to find out what settings were actually used. For a list of option constants, see documentation for allegro_gl_set().
Definition at line 413 of file alleggl.c. References __allegro_gl_required_settings, __allegro_gl_suggested_settings, allegro_gl_rgba_size::a, allegro_gl_display_info::accum_size, AGL_ACC_ALPHA_DEPTH, AGL_ACC_BLUE_DEPTH, AGL_ACC_GREEN_DEPTH, AGL_ACC_RED_DEPTH, AGL_ALLEGRO_FORMAT, AGL_ALPHA_DEPTH, AGL_AUX_BUFFERS, AGL_BLUE_DEPTH, AGL_COLOR_DEPTH, AGL_DONTCARE, AGL_DOUBLEBUFFER, AGL_FLOAT_COLOR, AGL_FLOAT_Z, AGL_FULLSCREEN, AGL_GREEN_DEPTH, AGL_RED_DEPTH, AGL_REQUIRE, AGL_SAMPLE_BUFFERS, AGL_SAMPLES, AGL_STENCIL_DEPTH, AGL_STEREO, AGL_SUGGEST, AGL_VIDEO_MEMORY_POLICY, AGL_WINDOW_X, AGL_WINDOW_Y, AGL_WINDOWED, AGL_Z_DEPTH, allegro_gl_display_info::allegro_format, allegro_gl_display_info, allegro_gl_display_info::aux_buffers, allegro_gl_rgba_size::b, allegro_gl_display_info::depth_size, allegro_gl_display_info::doublebuffered, allegro_gl_display_info::float_color, allegro_gl_display_info::float_depth, allegro_gl_display_info::fullscreen, allegro_gl_rgba_size::g, allegro_gl_display_info::pixel_size, allegro_gl_rgba_size::r, allegro_gl_pixel_size::rgba, allegro_gl_display_info::sample_buffers, allegro_gl_display_info::samples, allegro_gl_display_info::stencil_size, allegro_gl_display_info::stereo, allegro_gl_display_info::vidmem_policy, allegro_gl_display_info::x, and allegro_gl_display_info::y. Referenced by allegro_gl_save_settings(). |
|
Saves the current settings (as specified by allegro_gl_set()) to the current config file, in the section [OpenGL].
Definition at line 552 of file alleggl.c. References AGL_ACC_ALPHA_DEPTH, AGL_ACC_BLUE_DEPTH, AGL_ACC_GREEN_DEPTH, AGL_ACC_RED_DEPTH, AGL_ALLEGRO_FORMAT, AGL_ALPHA_DEPTH, AGL_AUX_BUFFERS, AGL_BLUE_DEPTH, AGL_COLOR_DEPTH, AGL_DOUBLEBUFFER, AGL_FLOAT_COLOR, AGL_FLOAT_Z, AGL_FULLSCREEN, AGL_GREEN_DEPTH, AGL_RED_DEPTH, AGL_REQUIRE, AGL_SAMPLE_BUFFERS, AGL_SAMPLES, AGL_STENCIL_DEPTH, AGL_STEREO, AGL_SUGGEST, AGL_VIDEO_MEMORY_POLICY, AGL_WINDOW_X, AGL_WINDOW_Y, AGL_WINDOWED, AGL_Z_DEPTH, allegro_gl_get(), and build_settings(). |
|
Loads the settings from the current config file, in the section [OpenGL]. Note that this function will not clear any settings currently set, but will add them up, as if each of the setting were set manually.
Definition at line 733 of file alleggl.c. References AGL_ACC_ALPHA_DEPTH, AGL_ACC_BLUE_DEPTH, AGL_ACC_GREEN_DEPTH, AGL_ACC_RED_DEPTH, AGL_ALLEGRO_FORMAT, AGL_ALPHA_DEPTH, AGL_AUX_BUFFERS, AGL_BLUE_DEPTH, AGL_COLOR_DEPTH, AGL_DOUBLEBUFFER, AGL_FLOAT_COLOR, AGL_FLOAT_Z, AGL_FULLSCREEN, AGL_GREEN_DEPTH, agl_parse_section(), AGL_RED_DEPTH, AGL_REQUIRE, AGL_SAMPLE_BUFFERS, AGL_SAMPLES, AGL_STENCIL_DEPTH, AGL_STEREO, AGL_SUGGEST, AGL_VIDEO_MEMORY_POLICY, AGL_WINDOW_X, AGL_WINDOW_Y, AGL_WINDOWED, AGL_Z_DEPTH, and allegro_gl_set(). |