#include <msp/strings/format.h>
+#include "deviceinfo.h"
#include "error.h"
#include "sampler.h"
void Sampler::set_mag_filter(TextureFilter f)
{
+ if(is_mipmapped(f))
+ throw invalid_argument("Sampler::set_mag_filter");
mag_filter = f;
dirty_params |= MAG_FILTER;
}
{
if(a<1.0f)
throw invalid_argument("Sampler::set_max_anisotropy");
+ if(a>DeviceInfo::get_global().limits.max_anisotropy)
+ throw out_of_range("Sampler::set_max_anisotropy");
bool supported = check_anisotropic(a>1.0f);
max_anisotropy = a;
if(supported)