From: Mikko Rasa Date: Sat, 30 Oct 2021 21:12:22 +0000 (+0300) Subject: Reorder functions in Sampler X-Git-Url: http://git.tdb.fi/?a=commitdiff_plain;h=5f5331a2d4c77c3954be1be65daa407d5841f8fc;p=libs%2Fgl.git Reorder functions in Sampler --- diff --git a/source/core/sampler.cpp b/source/core/sampler.cpp index 7560029c..d45dee54 100644 --- a/source/core/sampler.cpp +++ b/source/core/sampler.cpp @@ -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; diff --git a/source/core/sampler.h b/source/core/sampler.h index 7cf3d83a..c9f8ec96 100644 --- a/source/core/sampler.h +++ b/source/core/sampler.h @@ -125,15 +125,16 @@ public: than 1, filtering will consider more than than four samples when the texture is drawn at an oblique angle. */ void set_max_anisotropy(float); - float get_max_anisotropy() const { return max_anisotropy; } - /** Sets the wrapping mode for all coordinates. */ - void set_wrap(TextureWrap); + float get_max_anisotropy() const { return max_anisotropy; } void set_wrap_s(TextureWrap); void set_wrap_t(TextureWrap); void set_wrap_r(TextureWrap); + /** Sets the wrapping mode for all coordinates. */ + void set_wrap(TextureWrap); + /** Sets the border color for CLAMP_TO_BORDER wrap mode. */ void set_border_color(const Color &);