UltimateZoneBuilder/Source/Native/IndexBuffer.cpp
2019-08-30 10:30:28 +02:00

36 lines
543 B
C++

#include "Precomp.h"
#include "IndexBuffer.h"
IndexBuffer::IndexBuffer()
{
}
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;
}
/////////////////////////////////////////////////////////////////////////////
extern "C"
{
IndexBuffer* IndexBuffer_New()
{
return new IndexBuffer();
}
void IndexBuffer_Delete(IndexBuffer* buffer)
{
//delete buffer;
}
}