X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fmaterials%2Frendermethod.h;h=8fd289fe47c4a6638c7bc25e3e9fa6dc7e25bc7e;hb=f1e296bb2442dfbea12e7b38a97cc152aa34569c;hp=9d9ae6725437161355c605250bb00128d95c26f9;hpb=190a7e11237351f6b730c28f7b16f183e8adc69c;p=libs%2Fgl.git diff --git a/source/materials/rendermethod.h b/source/materials/rendermethod.h index 9d9ae672..8fd289fe 100644 --- a/source/materials/rendermethod.h +++ b/source/materials/rendermethod.h @@ -85,10 +85,11 @@ private: const Material *material = 0; std::string material_slot; std::vector textures; - CullMode face_cull = CULL_BACK; + CullMode face_cull = NO_CULL; 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 &);