Hi - I’ve just started learning OpenGL and have got round to texturing, but have encountered an odd problem with anisotropic filtering.
I’m using a very basic mipmap using plain colours (level 0 is white, level 1 red and so on) to help me see what’s going on. All examples are just a rectangle rotated into the scene.
No filtering (fine):
glTexParameteri (GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
glTexParameteri (GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST_MIPMAP_NEAREST);
Filtering, isotropic (again, all good):
glTexParameteri (GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
glTexParameteri (GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR_MIPMAP_LINEAR);
And with 4x anisotropic filtering (something wrong here):
glTexParameteri (GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
glTexParameteri (GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR_MIPMAP_LINEAR);
glTexParameterf (GL_TEXTURE_2D, GL_TEXTURE_MAX_ANISOTROPY_EXT, 4.0f)
As far as I can tell that last line is all that’s needed besides checking for the extension. Am I missing something?
Environment:
Linux
Mesa DRI R200
ATI Radeon 9200
Thanks in advance for any help!