From 44f2c1eac7679607aada5f41dc98dd232f276a11 Mon Sep 17 00:00:00 2001 From: Mikko Rasa Date: Fri, 27 Dec 2024 10:30:35 +0200 Subject: [PATCH] Add set_sampler function to Material --- source/materials/material.cpp | 5 +++++ source/materials/material.h | 1 + 2 files changed, 6 insertions(+) diff --git a/source/materials/material.cpp b/source/materials/material.cpp index dab0afe3..572386bf 100644 --- a/source/materials/material.cpp +++ b/source/materials/material.cpp @@ -51,6 +51,11 @@ const Program *Material::create_compatible_shader(const map &extra_ return shprog; } +void Material::set_sampler(const Sampler *s) +{ + sampler = s; +} + void Material::set_alpha_cutoff(float a) { alpha_cutoff = a; diff --git a/source/materials/material.h b/source/materials/material.h index a1fd9cf9..e110529f 100644 --- a/source/materials/material.h +++ b/source/materials/material.h @@ -99,6 +99,7 @@ public: virtual const Tag *get_texture_tags() const = 0; virtual const Texture *get_texture(Tag) const = 0; + void set_sampler(const Sampler *); virtual const Sampler *get_sampler(Tag) const { return sampler; } void set_alpha_cutoff(float); -- 2.45.2