Browse Source

Move VertexBuffer::Bind implementation to header to hint inlining

vrld 13 years ago
parent
commit
2b6cc4ea8c

+ 0 - 13
src/modules/graphics/opengl/VertexBuffer.cpp

@@ -59,19 +59,6 @@ namespace opengl
 	{
 	}
 
-	// VertexBuffer::Bind
-
-	VertexBuffer::Bind::Bind(VertexBuffer &buf)
-		: buf(buf)
-	{
-		buf.bind();
-	}
-
-	VertexBuffer::Bind::~Bind()
-	{
-		buf.unbind();
-	}
-
 	// VertexArray
 
 	VertexArray::VertexArray(size_t size, GLenum target, GLenum usage)

+ 5 - 2
src/modules/graphics/opengl/VertexBuffer.h

@@ -160,12 +160,15 @@ namespace opengl
 			/**
 			 * Bind a VertexBuffer.
 			 */
-			Bind(VertexBuffer &buf);
+			Bind(VertexBuffer &buf)
+				: buf(buf)
+			{ buf.bind(); }
 
 			/**
 			 * Unbinds a VertexBuffer.
 			 */
-			~Bind();
+			~Bind()
+			{ buf.unbind(); }
 
 		private: