From 6c1cb01d562bb8fbfe6559f00d42e811caebc8cd Mon Sep 17 00:00:00 2001 From: Mikko Rasa Date: Fri, 1 Oct 2021 19:11:51 +0300 Subject: [PATCH] Always require EXT_texture3D and ARB_shadow for samplers These are fairly old extensions and can be assumed to be always available. --- source/core/sampler.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/source/core/sampler.cpp b/source/core/sampler.cpp index 5d012125..5ea10c43 100644 --- a/source/core/sampler.cpp +++ b/source/core/sampler.cpp @@ -26,6 +26,8 @@ Sampler::Sampler(): dirty_params(0) { Require _req(ARB_sampler_objects); + Require _req2(EXT_texture3D); + Require _req3(ARB_shadow); if(ARB_direct_state_access) glCreateSamplers(1, &id); else @@ -91,8 +93,7 @@ void Sampler::set_wrap(TextureWrap w) { set_wrap_s(w); set_wrap_t(w); - if(EXT_texture3D) - set_wrap_r(w); + set_wrap_r(w); } void Sampler::set_wrap_s(TextureWrap w) @@ -109,7 +110,6 @@ void Sampler::set_wrap_t(TextureWrap w) void Sampler::set_wrap_r(TextureWrap w) { - static Require _req(EXT_texture3D); wrap_r = w; dirty_params |= WRAP_R; } @@ -128,7 +128,6 @@ void Sampler::disable_compare() void Sampler::set_compare(Predicate f) { - static Require _req(ARB_shadow); compare = true; cmp_func = f; dirty_params |= COMPARE; -- 2.45.2