From 69e7127d18035fabcf2f5ab40fa8ce5b9acea003 Mon Sep 17 00:00:00 2001 From: Mikko Rasa Date: Sun, 21 Feb 2021 23:26:05 +0200 Subject: [PATCH] Add missing keyword to set sampler compare mode from datafile --- source/core/sampler.cpp | 6 ++++++ source/core/sampler.h | 1 + 2 files changed, 7 insertions(+) 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); -- 2.43.0