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

allglint.h

00001 #ifndef gf_included_allglint_h
00002 #define gf_included_allglint_h
00003 
00004 #include "alleggl.h"
00005 
00006 
00007 struct allegro_gl_info {
00008     float version;          /* OpenGL version */
00009     int num_texture_units;  /* Number of texture units */
00010     int max_texture_size;   /* Maximum texture size */
00011     int is_voodoo3_and_under; /* Special cases for Voodoo 1-3 */
00012     int is_voodoo;          /* Special cases for Voodoo cards */
00013     int is_matrox_g200;     /* Special cases for Matrox G200 boards */
00014     int is_ati_rage_pro;    /* Special cases for ATI Rage Pro boards */
00015     int is_ati_radeon_7000; /* Special cases for ATI Radeon 7000 */
00016     int is_ati_r200_chip;   /* Special cases for ATI card with chip R200 */
00017     int is_mesa_driver;     /* Special cases for MESA */
00018 };
00019 
00020 
00021 
00022 struct allegro_gl_driver {
00023     void (*flip) (void);
00024     void (*gl_on) (void);
00025     void (*gl_off) (void);
00026     void (*screen_masked_blit)(struct BITMAP *source, int source_x,
00027                                int source_y, int dest_x, int dest_y,
00028                                int width, int height, int flip_dir,
00029                                int blit_type);
00030 };
00031 
00032 
00033 
00034 struct allegro_gl_rgba_size {
00035     int r, g, b, a;
00036 };
00037 
00038 
00039 
00040 struct allegro_gl_indexed_size {
00041     int bpp;
00042 };
00043 
00044 
00045 
00046 union allegro_gl_pixel_size {
00047     struct allegro_gl_rgba_size rgba;
00048     struct allegro_gl_indexed_size indexed;
00049 };
00050 
00051 
00052 
00053 struct allegro_gl_display_info {
00054     int allegro_format;
00055     union allegro_gl_pixel_size pixel_size;
00056     int colour_depth;
00057     union allegro_gl_pixel_size accum_size;
00058     int doublebuffered;
00059     int stereo;
00060     int aux_buffers;
00061     int depth_size;
00062     int stencil_size;
00063     int w, h, x, y;
00064     int r_shift, g_shift, b_shift, a_shift;
00065     int packed_pixel_type, packed_pixel_format;
00066     int rmethod; /* type of rendering, 0: software; 1: hardware, 2: unknown (X Win) */
00067     int fullscreen;
00068     int vidmem_policy;
00069     int sample_buffers;
00070     int samples;
00071 };
00072 
00073 extern struct allegro_gl_display_info allegro_gl_display_info;
00074 extern struct allegro_gl_driver *__allegro_gl_driver;
00075 extern struct allegro_gl_info allegro_gl_info;
00076 extern int __allegro_gl_required_settings, __allegro_gl_suggested_settings;
00077 extern int __allegro_gl_valid_context;
00078 extern int __allegro_gl_screen_mode;
00079 extern int __allegro_gl_use_alpha;
00080 extern GLint __allegro_gl_texture_read_format[5];
00081 extern GLint __allegro_gl_texture_components[5];
00082 
00083 #ifdef ALLEGRO_WINDOWS
00084 extern HDC __allegro_gl_hdc;
00085 #endif
00086 
00087 int __allegro_gl_make_power_of_2(int x);
00088 
00089 void __allegro_gl_reset_scorer (void);
00090 int __allegro_gl_score_config (int refnum, struct allegro_gl_display_info *dinfo);
00091 int __allegro_gl_best_config (void);
00092 
00093 void __allegro_gl_set_allegro_image_format (int big_endian);
00094 BITMAP* __allegro_gl_convert_masked_bitmap(int *dest_fmt, BITMAP *source, int source_x, int source_y, int width, int height, int flip);
00095 
00096 void __allegro_gl_init_screen_mode (void);
00097 void __allegro_gl_release_screen(void);
00098 
00099 void __allegro_gl_fill_in_info(void);
00100 
00101 void __allegro_gl_manage_extensions(void);
00102 void __allegro_gl_unmanage_extensions(void);
00103 void __allegro_gl_print_extensions(const char * extension);
00104 int __allegro_gl_look_for_an_extension(AL_CONST char *name,
00105                                                   AL_CONST GLubyte * extensions);
00106 
00107 
00108 extern _DRIVER_INFO *(*saved_gfx_drivers) (void);
00109 
00110 typedef void (* BLIT_BETWEEN_FORMATS_FUNC) (struct BITMAP*, struct BITMAP*, int, int, int, int, int, int);
00111 extern BLIT_BETWEEN_FORMATS_FUNC __blit_between_formats8;
00112 extern BLIT_BETWEEN_FORMATS_FUNC __blit_between_formats15;
00113 extern BLIT_BETWEEN_FORMATS_FUNC __blit_between_formats16;
00114 extern BLIT_BETWEEN_FORMATS_FUNC __blit_between_formats24;
00115 extern BLIT_BETWEEN_FORMATS_FUNC __blit_between_formats32;
00116 
00117 void allegro_gl_memory_blit_between_formats(struct BITMAP *source, struct BITMAP *dest, int source_x, int source_y, int dest_x, int dest_y, int width, int height);
00118 
00119 int allegro_gl_set_mouse_sprite(BITMAP *sprite, int xfocus, int yfocus);
00120 int allegro_gl_show_mouse(BITMAP* bmp, int x, int y);
00121 void allegro_gl_hide_mouse(void);
00122 void allegro_gl_move_mouse(int x, int y);
00123 
00124 
00125 extern GLenum __allegro_gl_get_bitmap_type(BITMAP *bmp, int flags);
00126 extern GLenum __allegro_gl_get_bitmap_color_format(BITMAP *bmp, int flags);
00127 extern GLint __allegro_gl_get_texture_format_ex(BITMAP *bmp, int flags);
00128 extern BITMAP *__allegro_gl_munge_bitmap(int flags, BITMAP *bmp, int x, int y,
00129                                       int w, int h, GLint *type, GLint *format);
00130 
00135 typedef struct FONT_AGL_DATA {
00136     int type;
00137     int start, end;
00138     int is_free_chunk;
00139 
00140     void *data;
00141     GLuint list_base;
00142     GLuint texture;
00143 
00144     struct FONT_AGL_DATA *next;
00145 } FONT_AGL_DATA;
00146 
00147 extern struct FONT_VTABLE *font_vtable_agl;
00148 
00149 
00154 #define AGL_TEXTURE_FORCE_ALPHA_INTERNAL 0x80000000
00155 
00159 #define AGL_TEXTURE_CHECK_VALID_INTERNAL 0x40000000
00160 
00161 
00162 #define AGL_LOG(level,str)
00163 
00164 #ifdef DEBUGMODE
00165 #ifdef LOGLEVEL
00166 
00167 void __allegro_gl_log (int level, const char *str);
00168 #undef AGL_LOG
00169 #define AGL_LOG(level,str) __allegro_gl_log (level, str)
00170 
00171 
00172 #endif
00173 #endif
00174 
00175 
00176 #define GET_ALLEGRO_VERSION() MAKE_VER(ALLEGRO_VERSION, ALLEGRO_SUB_VERSION, \
00177                                        ALLEGRO_WIP_VERSION)
00178 #define MAKE_VER(a, b, c) (((a) << 16) | ((b) << 8) | (c))
00179 
00180 
00181 #endif
00182 

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