Various improvements to database paing.

This commit is contained in:
Robert Osfield
2004-09-21 17:26:08 +00:00
parent eea9ddccf5
commit 0d884d66eb
14 changed files with 330 additions and 77 deletions

View File

@@ -77,6 +77,18 @@ unsigned int DrawArrayLengths::getNumIndices() const
return count;
}
DrawElementsUByte::~DrawElementsUByte()
{
for(unsigned int i=0;i<_vboList.size();++i)
{
if (_vboList[i] != 0)
{
Drawable::deleteVertexBufferObject(i,_vboList[i]);
_vboList[i] = 0;
}
}
}
void DrawElementsUByte::draw(State& state, bool useVertexBufferObjects) const
{
if (useVertexBufferObjects)
@@ -125,6 +137,18 @@ void DrawElementsUByte::offsetIndices(int offset)
}
DrawElementsUShort::~DrawElementsUShort()
{
for(unsigned int i=0;i<_vboList.size();++i)
{
if (_vboList[i] != 0)
{
Drawable::deleteVertexBufferObject(i,_vboList[i]);
_vboList[i] = 0;
}
}
}
void DrawElementsUShort::draw(State& state, bool useVertexBufferObjects) const
{
if (useVertexBufferObjects)
@@ -173,6 +197,18 @@ void DrawElementsUShort::offsetIndices(int offset)
}
DrawElementsUInt::~DrawElementsUInt()
{
for(unsigned int i=0;i<_vboList.size();++i)
{
if (_vboList[i] != 0)
{
Drawable::deleteVertexBufferObject(i,_vboList[i]);
_vboList[i] = 0;
}
}
}
void DrawElementsUInt::draw(State& state, bool useVertexBufferObjects) const
{
if (useVertexBufferObjects)