From d41da036408eb7edb09a03a6d168d063a5c9154d Mon Sep 17 00:00:00 2001 From: Jeff Teunissen Date: Tue, 9 Jan 2001 00:25:31 +0000 Subject: [PATCH] glquake.h: Whitespace, a new convenience check #define for multitexturing. qfgl_ext.h: Add protection against multiple includes of extensions from different files. Add defs for GL_EXT_paletted_texture. Change the #ifndef conditional for shared palettes to GL_EXT_shared_texture_palette. --- include/glquake.h | 20 +++++++++++--------- include/qfgl_ext.h | 20 ++++++++++++++++++-- 2 files changed, 29 insertions(+), 11 deletions(-) diff --git a/include/glquake.h b/include/glquake.h index d5a20db..2190b2b 100644 --- a/include/glquake.h +++ b/include/glquake.h @@ -154,20 +154,20 @@ extern cvar_t *r_dynamic; extern cvar_t *r_novis; extern cvar_t *r_netgraph; +extern cvar_t *gl_affinemodels; extern cvar_t *gl_clear; extern cvar_t *gl_cull; -extern cvar_t *gl_poly; -extern cvar_t *gl_texsort; -extern cvar_t *gl_smooth; -extern cvar_t *gl_smoothdlights; -extern cvar_t *gl_affinemodels; -extern cvar_t *gl_polyblend; -extern cvar_t *gl_keeptjunctions; +extern cvar_t *gl_fb_bmodels; +extern cvar_t *gl_fb_models; extern cvar_t *gl_flashblend; +extern cvar_t *gl_keeptjunctions; +extern cvar_t *gl_multitexture; extern cvar_t *gl_nocolors; extern cvar_t *gl_particles; -extern cvar_t *gl_fb_models; -extern cvar_t *gl_fb_bmodels; +extern cvar_t *gl_poly; +extern cvar_t *gl_polyblend; +extern cvar_t *gl_smooth; +extern cvar_t *gl_smoothdlights; extern cvar_t *gl_max_size; extern cvar_t *gl_playermip; @@ -195,6 +195,8 @@ extern QF_glActiveTextureARB qglActiveTexture; extern QF_glMultiTexCoord2fARB qglMultiTexCoord2f; extern qboolean gl_mtex_capable; extern GLenum gl_mtex_enum; +// convenience check +#define gl_mtex_active (gl_mtex_capable && gl_multitexture->int_val) void GL_DisableMultitexture (void); void GL_EnableMultitexture (void); diff --git a/include/qfgl_ext.h b/include/qfgl_ext.h index 65eda87..fc49368 100644 --- a/include/qfgl_ext.h +++ b/include/qfgl_ext.h @@ -60,11 +60,24 @@ // OpenGL numbers for extensions we use or want to use #ifndef GL_EXT_bgra +#define GL_EXT_bgra # define GL_BGR_EXT 0x80E0 # define GL_BGRA_EXT 0x80E1 #endif +#ifndef GL_EXT_paletted_texture +#define GL_EXT_paletted_texture +#define GL_COLOR_INDEX1_EXT 0x80E2 +#define GL_COLOR_INDEX2_EXT 0x80E3 +#define GL_COLOR_INDEX4_EXT 0x80E4 +#define GL_COLOR_INDEX8_EXT 0x80E5 +#define GL_COLOR_INDEX12_EXT 0x80E6 +#define GL_COLOR_INDEX16_EXT 0x80E7 +#define GL_TEXTURE_INDEX_SIZE_EXT 0x80ED +#endif + #ifndef GL_EXT_texture_object +#define GL_EXT_texture_object #define GL_TEXTURE_PRIORITY_EXT 0x8066 #define GL_TEXTURE_RESIDENT_EXT 0x8067 #define GL_TEXTURE_1D_BINDING_EXT 0x8068 @@ -73,17 +86,20 @@ #endif #ifndef GL_EXT_point_parameters +#define GL_EXT_point_parameters #define GL_POINT_SIZE_MIN_EXT 0x8126 #define GL_POINT_SIZE_MAX_EXT 0x8127 #define GL_POINT_FADE_THRESHOLD_SIZE_EXT 0x8128 #define GL_DISTANCE_ATTENUATION_EXT 0x8129 #endif -#ifndef GL_SHARED_TEXTURE_PALETTE_EXT -#define GL_SHARED_TEXTURE_PALETTE_EXT 0x81FB +#ifndef GL_EXT_shared_texture_palette +#define GL_EXT_shared_texture_palette +#define GL_SHARED_TEXTURE_PALETTE_EXT 0x81FB #endif #ifndef GL_ARB_multitexture +#define GL_ARB_multitexture #define GL_TEXTURE0_ARB 0x84C0 #define GL_TEXTURE1_ARB 0x84C1 #define GL_TEXTURE2_ARB 0x84C2