]> git.tdb.fi Git - libs/gl.git/blobdiff - source/materials/rendermethod.cpp
Add instancing support to standard shaders and RenderMethod
[libs/gl.git] / source / materials / rendermethod.cpp
index ddbe4f1e457e83760dc699bce85ad52dd64ac29e..66424856bdc12abbc9642846e63273da900c29aa 100644 (file)
@@ -34,6 +34,8 @@ void RenderMethod::maybe_create_material_shader()
                extra_spec["use_shadow_map"] = true;
        if(image_based_lighting)
                extra_spec["use_image_based_lighting"] = true;
+       if(instancing)
+               extra_spec["use_instancing"] = true;
 
        shprog = material->create_compatible_shader(extra_spec);
 
@@ -154,6 +156,7 @@ void RenderMethod::Loader::init_actions()
        add("face_cull", &RenderMethod::face_cull);
        add("shader",   &Loader::shader);
        add("image_based_lighting", &RenderMethod::image_based_lighting);
+       add("instancing", &RenderMethod::instancing);
        add("material", &Loader::material_inline);
        add("material", &Loader::material);
        add("material_slot", &RenderMethod::material_slot);