Introuced a local typedef of the index array type to keep the functor parameters consistent

This commit is contained in:
Robert Osfield 2010-12-12 08:54:58 +00:00
parent 09ebb061c2
commit 08d21d8777

View File

@ -135,7 +135,8 @@ public:
{
if (indices==0 || count==0) return;
typedef const GLubyte* IndexPointer;
typedef GLubyte Index;
typedef const Index* IndexPointer;
switch(mode)
{
@ -180,7 +181,7 @@ public:
case(GL_TRIANGLE_FAN):
{
IndexPointer iptr = indices;
unsigned int first = *iptr;
Index first = *iptr;
++iptr;
for(GLsizei i=2;i<count;++i,++iptr)
{
@ -202,7 +203,8 @@ public:
{
if (indices==0 || count==0) return;
typedef const GLushort* IndexPointer;
typedef GLushort Index;
typedef const Index* IndexPointer;
switch(mode)
{
@ -247,7 +249,7 @@ public:
case(GL_TRIANGLE_FAN):
{
IndexPointer iptr = indices;
unsigned int first = *iptr;
Index first = *iptr;
++iptr;
for(GLsizei i=2;i<count;++i,++iptr)
{
@ -269,7 +271,8 @@ public:
{
if (indices==0 || count==0) return;
typedef const GLuint* IndexPointer;
typedef GLuint Index;
typedef const Index* IndexPointer;
switch(mode)
{
@ -314,7 +317,7 @@ public:
case(GL_TRIANGLE_FAN):
{
IndexPointer iptr = indices;
unsigned int first = *iptr;
Index first = *iptr;
++iptr;
for(GLsizei i=2;i<count;++i,++iptr)
{