if (gl_support_anisotropy)
{
- int aniso = bound(1, gl_texture_anisotropy.integer, 128);
+ int aniso = bound(1, gl_texture_anisotropy.integer, gl_max_anisotropy);
if (gl_texture_anisotropy.integer != aniso)
Cvar_SetValueQuick(&gl_texture_anisotropy, aniso);
qglTexParameteri(textureenum, GL_TEXTURE_MAX_ANISOTROPY_EXT, aniso);CHECKGLERROR
#define GL_LINEAR_MIPMAP_LINEAR 0x2703
extern int gl_support_anisotropy;
+extern int gl_max_anisotropy;
#define GL_TEXTURE_MAX_ANISOTROPY_EXT 0x84FE
#define GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT 0x84FF
else if (options_cursor == optnum++)
Cvar_SetValueQuick (&gl_delayfinish, !gl_delayfinish.integer);
else if (options_cursor == optnum++)
- Cvar_SetValueQuick (&gl_texture_anisotropy, bound(1, gl_texture_anisotropy.value + dir, 8));
+ Cvar_SetValueQuick (&gl_texture_anisotropy, bound(1, gl_texture_anisotropy.integer + dir, gl_max_anisotropy));
else if (options_cursor == optnum++)
Cvar_SetValueQuick (&slowmo, bound(0, slowmo.value + dir * 0.25, 5));
else if (options_cursor == optnum++)
M_Options_PrintCheckbox(" Texture Combine", true, gl_combine.integer);
M_Options_PrintCheckbox(" Dithering", true, gl_dither.integer);
M_Options_PrintCheckbox("Delay gfx (faster)", true, gl_delayfinish.integer);
- M_Options_PrintSlider( "Anisotropic Filter", gl_support_anisotropy, gl_texture_anisotropy.value, 1, 8);
+ M_Options_PrintSlider( "Anisotropic Filter", gl_support_anisotropy, gl_texture_anisotropy.integer, 1, gl_max_anisotropy);
M_Options_PrintSlider( " Game Speed", sv.active, slowmo.value, 0, 5);
M_Options_PrintSlider( " CD Music Volume", cdaudioinitialized.integer, bgmvolume.value, 0, 1);
M_Options_PrintSlider( " Sound Volume", snd_initialized.integer, volume.value, 0, 1);
float in_mouse_x, in_mouse_y;
// GL_ARB_multitexture
-int gl_textureunits = 0;
+int gl_textureunits = 1;
// GL_ARB_texture_env_combine or GL_EXT_texture_env_combine
int gl_combine_extension = false;
// GL_EXT_compiled_vertex_array
int gl_support_var2 = false;
// GL_EXT_texture_filter_anisotropic
int gl_support_anisotropy = false;
+int gl_max_anisotropy = 1;
// GL_NV_texture_shader
int gl_textureshader = false;
// GL_EXT_stencil_two_side
void VID_CheckExtensions(void)
{
gl_stencil = vid_bitsperpixel.integer == 32;
+
+ // reset all the gl extension variables here
+ // this should match the declarations
+ gl_textureunits = 1;
gl_combine_extension = false;
- gl_dot3arb = false;
gl_supportslockarrays = false;
- gl_textureunits = 1;
+ gl_videosyncavailable = false;
+ gl_stencil = false;
+ gl_texture3d = false;
+ gl_texturecubemap = false;
+ gl_dot3arb = false;
gl_support_clamptoedge = false;
gl_support_var = false;
gl_support_var2 = false;
+ gl_support_anisotropy = false;
+ gl_max_anisotropy = 1;
+ gl_textureshader = false;
gl_support_stenciltwoside = false;
if (!GL_CheckExtension("OpenGL 1.1.0", opengl110funcs, NULL, false))
if (gl_support_var)
gl_support_var2 = GL_CheckExtension("GL_NV_vertex_array_range2", NULL, "-novar2", false);
- gl_support_anisotropy = GL_CheckExtension("GL_EXT_texture_filter_anisotropic", NULL, "-noanisotropy", false);
+ if ((gl_support_anisotropy = GL_CheckExtension("GL_EXT_texture_filter_anisotropic", NULL, "-noanisotropy", false)))
+ qglGetIntegerv(GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT, &gl_max_anisotropy);
gl_textureshader = GL_CheckExtension("GL_NV_texture_shader", NULL, "-notextureshader", false);