X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fvertexbuffer.cpp;h=d579a373c249da2b39460938fbc8a8ad5b02360a;hb=a361efc05fcad11b2918f3cd7abdebe794b131d8;hp=4385c2f10b0ae18f0253ffe0883ca68a111b9ce6;hpb=84bc56b96c21c831104a22e0cbd0f3b72ab5d8c3;p=libs%2Fgl.git diff --git a/source/vertexbuffer.cpp b/source/vertexbuffer.cpp index 4385c2f1..d579a373 100644 --- a/source/vertexbuffer.cpp +++ b/source/vertexbuffer.cpp @@ -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 //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