From 22fb2172d1cb59b339f29666946dee6818bb8558 Mon Sep 17 00:00:00 2001 From: Mikko Rasa Date: Mon, 19 Apr 2021 10:54:17 +0300 Subject: [PATCH] Disallow loading uniforms without a custom shader --- source/materials/renderpass.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/source/materials/renderpass.cpp b/source/materials/renderpass.cpp index 033c43b1..e6a9a0a4 100644 --- a/source/materials/renderpass.cpp +++ b/source/materials/renderpass.cpp @@ -263,6 +263,8 @@ void RenderPass::Loader::texunit_named(unsigned, const string &n) void RenderPass::Loader::uniforms() { + if(!obj.shprog || obj.shprog_from_material) + throw runtime_error("Shader is required for uniforms"); obj.ensure_private_shader_data(); load_sub(*obj.shdata); } -- 2.45.2