X-Git-Url: http://git.tdb.fi/?p=libs%2Fgl.git;a=blobdiff_plain;f=source%2Fcore%2Fsampler.cpp;h=4da13833330dac12eace04b145f9ffacd4a0510b;hp=7560029c64642cdef978b147c9d2be5e4263bafe;hb=HEAD;hpb=4365124bd39bd6edbda6eaef64ec72a1a10565f8 diff --git a/source/core/sampler.cpp b/source/core/sampler.cpp index 7560029c..4da13833 100644 --- a/source/core/sampler.cpp +++ b/source/core/sampler.cpp @@ -1,5 +1,5 @@ #include -#include "deviceinfo.h" +#include "device.h" #include "error.h" #include "sampler.h" @@ -38,7 +38,7 @@ void Sampler::set_max_anisotropy(float a) { if(a<1.0f) throw invalid_argument("Sampler::set_max_anisotropy"); - if(a>DeviceInfo::get_global().limits.max_anisotropy) + if(a>Device::get_current().get_info().limits.max_anisotropy) throw out_of_range("Sampler::set_max_anisotropy"); bool supported = check_anisotropic(a>1.0f); max_anisotropy = a; @@ -46,13 +46,6 @@ void Sampler::set_max_anisotropy(float a) dirty_params |= MAX_ANISOTROPY; } -void Sampler::set_wrap(TextureWrap w) -{ - set_wrap_s(w); - set_wrap_t(w); - set_wrap_r(w); -} - void Sampler::set_wrap_s(TextureWrap w) { wrap_s = w; @@ -71,6 +64,13 @@ void Sampler::set_wrap_r(TextureWrap w) dirty_params |= WRAP_R; } +void Sampler::set_wrap(TextureWrap w) +{ + set_wrap_s(w); + set_wrap_t(w); + set_wrap_r(w); +} + void Sampler::set_border_color(const Color &c) { border_color = c;