3
\$\begingroup\$

In software, at runtime, (C++ if it matters), is there a way to find out the maximum level of anisotropic filtering supported by the graphics card?

\$\endgroup\$
5
\$\begingroup\$

In general you ask your graphics API you're using.

For example if you're using D3D9 you call IDirect3DDevice9::GetDeviceCaps() and then check the MaxAnisotropy value in the D3DCAPS9 structure.

On almost any reasonably modern graphics card the answer will be 16.

\$\endgroup\$
5
\$\begingroup\$

In OpenGL, you would (after creating a context and everything) do this:

GLfloat maxAniso = 0.0f;
glGetFloatv(GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT, &maxAniso);

Of course, this only works when the GL_EXT_texture_filter_anisotropic extension is available, but since every graphics card has supported this is about the year 2000, I wouldn't worry about it.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.