2019-08-09 04:18:08 +00:00
|
|
|
|
2019-08-10 00:32:08 +00:00
|
|
|
#include "Precomp.h"
|
2019-08-09 04:18:08 +00:00
|
|
|
#include "IndexBuffer.h"
|
|
|
|
|
2019-08-16 09:24:22 +00:00
|
|
|
IndexBuffer::IndexBuffer()
|
2019-08-09 04:18:08 +00:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2019-08-10 05:46:29 +00:00
|
|
|
IndexBuffer::~IndexBuffer()
|
|
|
|
{
|
|
|
|
// To do: move mBuffer to a delete list as this might be called by a finalizer in a different thread
|
|
|
|
}
|
|
|
|
|
|
|
|
GLuint IndexBuffer::GetBuffer()
|
|
|
|
{
|
|
|
|
if (mBuffer == 0)
|
|
|
|
glGenBuffers(1, &mBuffer);
|
|
|
|
return mBuffer;
|
|
|
|
}
|
|
|
|
|
2019-08-09 04:18:08 +00:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
2019-08-16 09:24:22 +00:00
|
|
|
IndexBuffer* IndexBuffer_New()
|
2019-08-09 04:18:08 +00:00
|
|
|
{
|
2019-08-16 09:24:22 +00:00
|
|
|
return new IndexBuffer();
|
2019-08-09 04:18:08 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void IndexBuffer_Delete(IndexBuffer* buffer)
|
|
|
|
{
|
2019-08-17 01:08:34 +00:00
|
|
|
//delete buffer;
|
2019-08-09 04:18:08 +00:00
|
|
|
}
|