From: Mikko Rasa Date: Sun, 21 Feb 2021 21:26:05 +0000 (+0200) Subject: Add missing keyword to set sampler compare mode from datafile X-Git-Url: http://git.tdb.fi/?a=commitdiff_plain;h=69e7127d18035fabcf2f5ab40fa8ce5b9acea003;p=libs%2Fgl.git Add missing keyword to set sampler compare mode from datafile --- diff --git a/source/core/sampler.cpp b/source/core/sampler.cpp index 5375d17d..3f853ea0 100644 --- a/source/core/sampler.cpp +++ b/source/core/sampler.cpp @@ -240,6 +240,7 @@ void Sampler::unload() Sampler::Loader::Loader(Sampler &s): DataFile::ObjectLoader(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); diff --git a/source/core/sampler.h b/source/core/sampler.h index e1e9bec5..4208f069 100644 --- a/source/core/sampler.h +++ b/source/core/sampler.h @@ -69,6 +69,7 @@ public: private: void init(); + void compare(Predicate); void filter(TextureFilter); void mag_filter(TextureFilter); void max_anisotropy(float);