]> git.tdb.fi Git - libs/gl.git/commitdiff
Add missing keyword to set sampler compare mode from datafile
authorMikko Rasa <tdb@tdb.fi>
Sun, 21 Feb 2021 21:26:05 +0000 (23:26 +0200)
committerMikko Rasa <tdb@tdb.fi>
Sun, 21 Feb 2021 21:26:05 +0000 (23:26 +0200)
source/core/sampler.cpp
source/core/sampler.h

index 5375d17dfc5072d9108334b1627e930449da5e4d..3f853ea04126f1ac95ce2c164cc1ee1ff5229a2e 100644 (file)
@@ -240,6 +240,7 @@ void Sampler::unload()
 Sampler::Loader::Loader(Sampler &s):
        DataFile::ObjectLoader<Sampler>(s)
 {
+       add("compare", &Loader::compare);
        add("filter", &Loader::filter);
        add("mag_filter", &Loader::mag_filter);
        add("max_anisotropy", &Loader::max_anisotropy);
@@ -250,6 +251,11 @@ Sampler::Loader::Loader(Sampler &s):
        add("wrap_t", &Loader::wrap_t);
 }
 
+void Sampler::Loader::compare(Predicate c)
+{
+       obj.set_compare(c);
+}
+
 void Sampler::Loader::filter(TextureFilter f)
 {
        obj.set_filter(f);
index e1e9bec5d60332e5331cd6e1e52e421c5256e8e9..4208f069da4f4c6566c2fca362949ef20702d51b 100644 (file)
@@ -69,6 +69,7 @@ public:
        private:
                void init();
 
+               void compare(Predicate);
                void filter(TextureFilter);
                void mag_filter(TextureFilter);
                void max_anisotropy(float);