Move VertexBuffer::Bind implementation to header to hint inlining

This commit is contained in:
vrld
2012-03-07 23:01:05 +01:00
parent 4947498488
commit 2b6cc4ea8c
2 changed files with 5 additions and 15 deletions
@@ -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
View File
@@ -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: