From 3313c7a76da328b5660410655281d82bde57b9d8 Mon Sep 17 00:00:00 2001 From: Nathan Alo Date: Sat, 15 Jul 2023 10:35:46 +0000 Subject: [PATCH] add more constructors to `UnlitMaterial` --- source/Vignette/Graphics/UnlitMaterial.cs | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/source/Vignette/Graphics/UnlitMaterial.cs b/source/Vignette/Graphics/UnlitMaterial.cs index 297b52b..424723b 100644 --- a/source/Vignette/Graphics/UnlitMaterial.cs +++ b/source/Vignette/Graphics/UnlitMaterial.cs @@ -70,6 +70,19 @@ public UnlitMaterial() { } + public UnlitMaterial(Texture texture) + : this(false) + { + Texture = texture; + } + + public UnlitMaterial(Texture texture, Sampler sampler) + : this(false) + { + Texture = texture; + Sampler = sampler; + } + private UnlitMaterial(bool isDefault) { effect = Effect.From(shader, out layout, out properties);