]> git.tdb.fi Git - libs/gl.git/blobdiff - source/materials/rendermethod.h
Use default member initializers for simple types
[libs/gl.git] / source / materials / rendermethod.h
index bf35aac57db1177e0a06ee229fe22a3197f64cf2..723aa5a25733c980c85d6db62e06eb1bc4d04669 100644 (file)
@@ -72,21 +72,17 @@ 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<ProgramData> shdata;
        std::map<Tag, Tag> uniform_slots;
-       const Material *material;
+       const Material *material = 0;
        std::string material_slot;
        std::vector<TextureSlot> textures;
-       CullMode face_cull;
-       bool receive_shadows;
-       bool image_based_lighting;
+       CullMode face_cull = CULL_BACK;
+       bool receive_shadows = false;
+       bool image_based_lighting = false;
 
-public:
-       RenderMethod();
-
-private:
        void maybe_create_material_shader();
        void set_material_textures();