]> git.tdb.fi Git - libs/gl.git/commitdiff
Always require EXT_texture3D and ARB_shadow for samplers
authorMikko Rasa <tdb@tdb.fi>
Fri, 1 Oct 2021 16:11:51 +0000 (19:11 +0300)
committerMikko Rasa <tdb@tdb.fi>
Fri, 1 Oct 2021 16:36:23 +0000 (19:36 +0300)
These are fairly old extensions and can be assumed to be always
available.

source/core/sampler.cpp

index 5d0121254196dd3e1b8cfae52768a6d07855caec..5ea10c43f6657c13eb3d0fe88824602d09420988 100644 (file)
@@ -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;