]> git.tdb.fi Git - libs/gl.git/blobdiff - source/core/vertexarray.h
Only allow VertexArray's format to be set once
[libs/gl.git] / source / core / vertexarray.h
index 95a6ec2f3aa526ac11165b4f24e77e5d30d67b10..4c2a028f83b1439f0104cc275602160332e1757e 100644 (file)
@@ -43,10 +43,16 @@ private:
        VertexArray(const VertexArray &);
        VertexArray &operator=(const VertexArray &);
 public:
+       VertexArray();
+
+       /// Construct a VertexArray and set its format.
        VertexArray(const VertexFormat &);
 
-       /// Resets the VertexArray to a different format.  All data is cleared.
-       void reset(const VertexFormat &);
+       /// Deprecated.  Use set_format.
+       DEPRECATED void reset(const VertexFormat &f) { set_format(f); }
+
+       /// Sets the format of the VertexArray.
+       void set_format(const VertexFormat &);
 
        const VertexFormat &get_format() const { return format; }