]> git.tdb.fi Git - libs/gl.git/blobdiff - source/buffer.cpp
Rework exceptions
[libs/gl.git] / source / buffer.cpp
index 51f4873f76274d2f37305ba8bbc3045eb00406a6..fbb1e159ee564df8b2d7816e459adda6312cfc20 100644 (file)
@@ -1,14 +1,10 @@
-/* $Id$
-
-This file is part of libmspgl
-Copyright © 2007  Mikko Rasa, Mikkosoft Productions
-Distributed under the LGPL
-*/
-
+#include <stdexcept>
 #include "arb_vertex_buffer_object.h"
 #include "extension.h"
 #include "buffer.h"
 
+using namespace std;
+
 namespace Msp {
 namespace GL {
 
@@ -77,7 +73,7 @@ const Buffer *&Buffer::binding(BufferType type)
        case ELEMENT_ARRAY_BUFFER: return bound[1];
        case PIXEL_PACK_BUFFER:    return bound[2];
        case PIXEL_UNPACK_BUFFER:  return bound[3];
-       default: throw InvalidParameterValue("Invalid buffer type");
+       default: throw invalid_argument("Buffer::binding");
        }
 }