X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fmaterials%2Frendermethod.h;h=94f716a41c871d4705f76bc585ad493087379fa6;hb=69f8cd98ee3b78f2e4ee509d30e5e828456ef702;hp=bf35aac57db1177e0a06ee229fe22a3197f64cf2;hpb=ae45c0397e2cb8f0a01f2f31d01c95ff3870271e;p=libs%2Fgl.git diff --git a/source/materials/rendermethod.h b/source/materials/rendermethod.h index bf35aac5..94f716a4 100644 --- a/source/materials/rendermethod.h +++ b/source/materials/rendermethod.h @@ -3,6 +3,7 @@ #include #include +#include "blend.h" #include "cullface.h" #include "material.h" @@ -40,6 +41,8 @@ public: private: virtual void finish(); + void blend(); + void blend_factors(BlendFactor, BlendFactor); void material_inline(); void material(const std::string &); void shader(const std::string &); @@ -72,21 +75,18 @@ private: TextureSlot(Tag t): tag(t), texture(0), sampler(0) { } }; - const Program *shprog; - bool shprog_from_material; + const Program *shprog = 0; + bool shprog_from_material = false; RefPtr shdata; std::map uniform_slots; - const Material *material; + const Material *material = 0; std::string material_slot; std::vector textures; - CullMode face_cull; - bool receive_shadows; - bool image_based_lighting; + CullMode face_cull = CULL_BACK; + Blend blend; + bool receive_shadows = false; + bool image_based_lighting = false; -public: - RenderMethod(); - -private: void maybe_create_material_shader(); void set_material_textures(); @@ -102,6 +102,8 @@ public: Tag get_texture_tag(const std::string &) const; void set_face_cull(CullMode); CullMode get_face_cull() const { return face_cull; } + void set_blend(const Blend &); + const Blend &get_blend() const { return blend; } void set_receive_shadows(bool); bool get_receive_shadows() const { return receive_shadows; } void set_image_based_lighting(bool);