mirror of
https://github.com/love2d/love.git
synced 2026-08-16 08:11:02 +02:00
Move VertexBuffer::Bind implementation to header to hint inlining
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user