Fixed the handling begin()/vertex()/end() sequences in TriangleIndexFunctor.

This commit is contained in:
Robert Osfield
2004-03-29 12:28:40 +00:00
parent 9e4b23a1ef
commit e44176a7aa

View File

@@ -52,7 +52,7 @@ public:
{
if (!_indexCache.empty())
{
drawArrays(_modeCache,0,_indexCache.size());
drawElements(_modeCache,_indexCache.size(),&_indexCache.front());
}
}
@@ -70,7 +70,7 @@ public:
break;
}
case(GL_TRIANGLE_STRIP):
{
{
unsigned int pos=first;
for(GLsizei i=2;i<count;++i,++pos)
{
@@ -122,7 +122,7 @@ public:
virtual void drawElements(GLenum mode,GLsizei count,const GLubyte* indices)
{
if (indices==0 || count==0) return;
typedef const GLubyte* IndexPointer;
switch(mode)
@@ -189,7 +189,7 @@ public:
virtual void drawElements(GLenum mode,GLsizei count,const GLushort* indices)
{
if (indices==0 || count==0) return;
typedef const GLushort* IndexPointer;
switch(mode)