]> git.tdb.fi Git - libs/gl.git/commitdiff
Disallow loading uniforms without a custom shader
authorMikko Rasa <tdb@tdb.fi>
Mon, 19 Apr 2021 07:54:17 +0000 (10:54 +0300)
committerMikko Rasa <tdb@tdb.fi>
Mon, 19 Apr 2021 07:54:17 +0000 (10:54 +0300)
source/materials/renderpass.cpp

index 033c43b1955ae56b08ed4dddfc17d6fdef9789f2..e6a9a0a4145e87e8c2a30246f1d20f96c0228c57 100644 (file)
@@ -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);
 }