Set filtering to best possible, let me know if additional problems are seen now.
I can no longer reproduce any artifacts on my box, which is odd. git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2557 4a71c877-e1ca-e34f-864e-861f7616d084master
parent
eff43d1fa1
commit
3597192e3a
|
@ -76,11 +76,20 @@ static int newPage(const char *name, int level, int width, int height, int count
|
|||
glTexImage2D(GL_TEXTURE_2D, level, wz_texture_compression, width, height, 0,
|
||||
GL_RGBA, GL_UNSIGNED_BYTE, NULL);
|
||||
glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE);
|
||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST_MIPMAP_LINEAR);
|
||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR_MIPMAP_LINEAR);
|
||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
|
||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
|
||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
|
||||
|
||||
// Use anisotropic filtering, if available, but only max 4.0 to reduce processor burden
|
||||
if (check_extension("GL_EXT_texture_filter_anisotropic"))
|
||||
{
|
||||
GLfloat max;
|
||||
|
||||
glGetFloatv(GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT, &max);
|
||||
glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAX_ANISOTROPY_EXT, MIN(4.0f, max));
|
||||
}
|
||||
|
||||
return texPage;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue