|
|
|
|
@ -48,14 +48,18 @@ static_assert((filter_or(Nearest, Base) == GL_NEAREST) &&
|
|
|
|
|
#undef filter_or |
|
|
|
|
|
|
|
|
|
Float Sampler::maxMaxAnisotropy() { |
|
|
|
|
if(!Context::current().isExtensionSupported<Extensions::GL::EXT::texture_filter_anisotropic>()) |
|
|
|
|
return 0.0f; |
|
|
|
|
|
|
|
|
|
GLfloat& value = Context::current().state().texture->maxMaxAnisotropy; |
|
|
|
|
|
|
|
|
|
/* Get the value, if not already cached */ |
|
|
|
|
if(value == 0.0f) |
|
|
|
|
glGetFloatv(GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT, &value); |
|
|
|
|
if(value == 0.0f) { |
|
|
|
|
#ifndef MAGNUM_TARGET_GLES |
|
|
|
|
if(Context::current().isExtensionSupported<Extensions::GL::ARB::texture_filter_anisotropic>()) |
|
|
|
|
glGetFloatv(GL_MAX_TEXTURE_MAX_ANISOTROPY, &value); |
|
|
|
|
else |
|
|
|
|
#endif |
|
|
|
|
if(Context::current().isExtensionSupported<Extensions::GL::EXT::texture_filter_anisotropic>()) |
|
|
|
|
glGetFloatv(GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT, &value); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
return value; |
|
|
|
|
} |
|
|
|
|
|