Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

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?

share|improve this question

2 Answers 2

up vote 5 down vote accepted

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.

share|improve this answer

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.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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