]> git.tdb.fi Git - libs/gl.git/blobdiff - source/render/instancearray.h
Use default member initializers in some more classes
[libs/gl.git] / source / render / instancearray.h
index 6a598b5854f3183e290896eb052708f32c0f98a6..0965499fe66f98de6268619a189f80d253d91800 100644 (file)
@@ -4,6 +4,8 @@
 #include <vector>
 #include "programdata.h"
 #include "renderable.h"
+#include "vertexarray.h"
+#include "vertexsetup.h"
 
 namespace Msp {
 namespace GL {
@@ -11,8 +13,6 @@ namespace GL {
 class Buffer;
 class Object;
 class ObjectInstance;
-class VertexArray;
-class VertexSetup;
 
 /**
 Renders multiple instances of an Object in an efficient manner.  If instanced
@@ -39,11 +39,11 @@ public:
 private:
        const Object &object;
        std::vector<ObjectInstance *> instances;
-       VertexArray *instance_data;
-       Buffer *instance_buffer;
-       VertexSetup *vtx_setup;
-       int matrix_location;
-       unsigned matrix_offset;
+       VertexArray instance_data;
+       Buffer *instance_buffer = 0;
+       VertexSetup vtx_setup;
+       int matrix_location = -1;
+       unsigned matrix_offset = 0;
 
 public:
        InstanceArray(const Object &);