X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;ds=sidebyside;f=source%2Fmaterials%2Frendermethod.h;h=9d9ae6725437161355c605250bb00128d95c26f9;hb=HEAD;hp=9ac9337fe321989ca187ccce126fda422b363277;hpb=74a5bc6159d2c753786a5ef6bf785263cd0538f1;p=libs%2Fgl.git diff --git a/source/materials/rendermethod.h b/source/materials/rendermethod.h index 9ac9337f..8fd289fe 100644 --- a/source/materials/rendermethod.h +++ b/source/materials/rendermethod.h @@ -89,6 +89,7 @@ private: Blend blend; bool receive_shadows = false; bool image_based_lighting = false; + bool instancing = false; void maybe_create_material_shader(); void set_material_textures(); @@ -126,6 +127,12 @@ public: bool get_image_based_lighting() const { return image_based_lighting; } + /** Toggles instanced rendering. Only affects shaders created from + materials. Should be used with InstanceArray. */ + void set_instancing(bool); + + bool get_instancing() const { return instancing; } + void apply(Renderer &) const; void set_debug_name(const std::string &);