]> git.tdb.fi Git - libs/gl.git/blobdiff - source/vertexarray.h
Unbind things if they are deleted while current
[libs/gl.git] / source / vertexarray.h
index 0223a1f4434df584cc16dd59a0a659f23d2f1409..9fa55b7117c32fdc2901c74215223b6616f9fa53 100644 (file)
@@ -68,9 +68,12 @@ public:
        const std::vector<float> &get_data() const { return data; }
        const float *operator[](unsigned i) const { return &data[0]+i*stride; }
 
-       void apply() const;
+       void bind() const;
+       void apply() const { bind(); }
 private:
        static void apply_arrays(const std::vector<Array> *, const std::vector<Array> *, const float *, unsigned);
+public:
+       static void unbind();
 };
 
 } // namespace GL