From 5f5331a2d4c77c3954be1be65daa407d5841f8fc Mon Sep 17 00:00:00 2001 From: Mikko Rasa Date: Sun, 31 Oct 2021 00:12:22 +0300 Subject: [PATCH] Reorder functions in Sampler --- source/core/sampler.cpp | 14 +++++++------- source/core/sampler.h | 7 ++++--- 2 files changed, 11 insertions(+), 10 deletions(-) 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 &); -- 2.43.0