Patch by Spike, don't let gl_texturemode2d affect the console font.

git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@2859 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
Molgrum 2008-01-16 00:27:28 +00:00
parent 28a7f7165e
commit 01483e5e89

View file

@ -702,6 +702,10 @@ void GL_Texturemode2d_Callback (struct cvar_s *var, char *oldvalue)
{ {
if (!glt->mipmap) if (!glt->mipmap)
{ {
//texture2d sampling modes do not affect conchars, use gl_smoothfont for that.
if (glt->texnum == char_texture || glt->texnum == default_char_texture || glt->texnum == char_tex2)
continue;
GL_Bind (glt->texnum); GL_Bind (glt->texnum);
qglTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, gl_filter_max_2d); qglTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, gl_filter_max_2d);
qglTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, gl_filter_max_2d); qglTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, gl_filter_max_2d);
@ -1021,6 +1025,10 @@ TRACE(("dbg: GLDraw_ReInit: Allocating upload buffers\n"));
char_tex2 = GL_LoadTexture ("charset", 128, 128, draw_chars, false, true); char_tex2 = GL_LoadTexture ("charset", 128, 128, draw_chars, false, true);
} }
//make sure the sampling takes effect
GL_Smoothfont_Callback(&gl_smoothfont, "");
cs_texture = texture_extension_number++; cs_texture = texture_extension_number++;
missing_texture = GL_LoadTexture("no_texture", 16, 16, (unsigned char*)r_notexture_mip + r_notexture_mip->offsets[0], true, false); missing_texture = GL_LoadTexture("no_texture", 16, 16, (unsigned char*)r_notexture_mip + r_notexture_mip->offsets[0], true, false);