mirror of
https://github.com/love2d/love.git
synced 2026-08-20 04:30:09 +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::VertexArray(size_t size, GLenum target, GLenum usage)
|
VertexArray::VertexArray(size_t size, GLenum target, GLenum usage)
|
||||||
|
|||||||
@@ -160,12 +160,15 @@ namespace opengl
|
|||||||
/**
|
/**
|
||||||
* Bind a VertexBuffer.
|
* Bind a VertexBuffer.
|
||||||
*/
|
*/
|
||||||
Bind(VertexBuffer &buf);
|
Bind(VertexBuffer &buf)
|
||||||
|
: buf(buf)
|
||||||
|
{ buf.bind(); }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Unbinds a VertexBuffer.
|
* Unbinds a VertexBuffer.
|
||||||
*/
|
*/
|
||||||
~Bind();
|
~Bind()
|
||||||
|
{ buf.unbind(); }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user