Anisotropic filtering

Started by
0 comments, last by zxc 21 years, 10 months ago
I''m using this code to enable anisotropic filtering in my app: float fMax = 0.0f; glGetTexParameterfv(GL_TEXTURE_2D, GL_TEXTURE_MAX_ANISOTROPY_EXT, &fMax ); glTexParameterf( GL_TEXTURE_2D, GL_TEXTURE_MAX_ANISOTROPY_EXT, fMax); So, the same constant is used to get the MAX anisotropy level and to set the CURRENT level? Isn''t this a little misleading? I was looking for a way to retrieve the current (not the max) anisotropy level, is there a way to do this? Thanks
Advertisement
Actually,

glGetTexParameterfv(GL_TEXTURE_2D, GL_TEXTURE_MAX_ANISOTROPY_EXT, &fMax );

Will return the currently set max anisotropy level. To get the maximum value supported by the implementation, use:

glGetFloatv(GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT, &fMax);

What you''re doing in your code is just setting it to the value it was already at.

This topic is closed to new replies.

Advertisement