Put that OpenGL error message to rest.

The error was quite valid: setting GL_TEXTURE_MAX_ANISOTROPY_EXT to 0 is
incorrect. The problem was caused by the call to glTexParameterf being
before the gl_anisotropy cvar was initialized. Thus, move all of the setup
code in GL_Init_Common() to after all the checks and, more importantly,
after the call to GL_Common_Init_Cvars().
This commit is contained in:
Bill Currie 2011-12-15 09:17:57 +09:00
parent e9ab230626
commit 51aaee5c3b

View file

@ -592,6 +592,15 @@ GL_Init_Common (void)
GLF_FindFunctions ();
CheckGLVersionString ();
CheckAnisotropyExtensions ();
CheckMultiTextureExtensions ();
CheckCombineExtensions ();
CheckBGRAExtensions ();
CheckTruFormExtensions ();
GL_Common_Init_Cvars ();
CheckVertexArraySize ();
CheckLights ();
qfglClearColor (0, 0, 0, 0);
qfglEnable (GL_TEXTURE_2D);
@ -602,7 +611,6 @@ GL_Init_Common (void)
qfglEnable (GL_BLEND);
qfglBlendFunc (GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
CheckAnisotropyExtensions ();
qfglTexEnvf (GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE);
qfglTexParameterf (GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, gl_filter_min);
qfglTexParameterf (GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, gl_filter_max);
@ -611,14 +619,6 @@ GL_Init_Common (void)
aniso);
qfglTexParameterf (GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT);
qfglTexParameterf (GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT);
CheckMultiTextureExtensions ();
CheckCombineExtensions ();
CheckBGRAExtensions ();
CheckTruFormExtensions ();
GL_Common_Init_Cvars ();
CheckVertexArraySize ();
CheckLights ();
}
VISIBLE qboolean