]> git.tdb.fi Git - libs/gl.git/blobdiff - source/vertexbuffer.cpp
Use DevIL for loading images
[libs/gl.git] / source / vertexbuffer.cpp
index 4385c2f10b0ae18f0253ffe0883ca68a111b9ce6..d579a373c249da2b39460938fbc8a8ad5b02360a 100644 (file)
@@ -1,3 +1,10 @@
+/* $Id$
+
+This file is part of libmspgl
+Copyright © 2007  Mikko Rasa, Mikkosoft Productions
+Distributed under the LGPL
+*/
+
 #define GL_GLEXT_PROTOTYPES
 #include <GL/gl.h>
 //XXX gl.h seems to include glext.h, but can I rely on this?
@@ -30,6 +37,15 @@ VertexBuffer::~VertexBuffer()
        glDeleteBuffers(1, &id);
 }
 
+void VertexBuffer::unbind()
+{
+       if(bound)
+       {
+               glBindBuffer(GL_ARRAY_BUFFER, 0);
+               bound=0;
+       }
+}
+
 const VertexBuffer *VertexBuffer::bound=0;
 
 } // namespace GL