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);
auto i = find_member(textures, tag, &TextureSlot::tag);
if(i==textures.end())
{
- textures.push_back(TextureSlot(tag));
+ textures.emplace_back(tag);
i = textures.end()-1;
}
i->texture = tex;
add("blend", &Loader::blend);
add("blend", &Loader::blend_factors);
add("face_cull", &RenderMethod::face_cull);
- add("shader", &Loader::shader);
+ 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);
auto i = find_member(obj.textures, Tag(n), &TextureSlot::tag);
if(i==obj.textures.end())
{
- obj.textures.push_back(TextureSlot(n));
+ obj.textures.emplace_back(n);
i = obj.textures.end()-1;
}
TextureSlot::Loader ldr(*i, n, coll);