Build fixes for gcc 3.4.1 support

This commit is contained in:
Robert Osfield 2004-08-01 08:26:44 +00:00
parent 8d1b390c7e
commit 4d9bd4d825
6 changed files with 78 additions and 75 deletions

View File

@ -141,9 +141,9 @@ class TemplateArray : public Array, public std::vector<T>
return 0; return 0;
} }
virtual const GLvoid* getDataPointer() const { if (!empty()) return &front(); else return 0; } virtual const GLvoid* getDataPointer() const { if (!this->empty()) return &this->front(); else return 0; }
virtual unsigned int getTotalDataSize() const { return size()*sizeof(T); } virtual unsigned int getTotalDataSize() const { return this->size()*sizeof(T); }
virtual unsigned int getNumElements() const { return size(); } virtual unsigned int getNumElements() const { return this->size(); }
protected: protected:
@ -219,9 +219,9 @@ class TemplateIndexArray : public IndexArray, public std::vector<T>
return 0; return 0;
} }
virtual const GLvoid* getDataPointer() const { if (!empty()) return &front(); else return 0; } virtual const GLvoid* getDataPointer() const { if (!this->empty()) return &this->front(); else return 0; }
virtual unsigned int getTotalDataSize() const { return size()*sizeof(T); } virtual unsigned int getTotalDataSize() const { return this->size()*sizeof(T); }
virtual unsigned int getNumElements() const { return size(); } virtual unsigned int getNumElements() const { return this->size(); }
virtual unsigned int index(unsigned int pos) const { return (*this)[pos]; } virtual unsigned int index(unsigned int pos) const { return (*this)[pos]; }

View File

@ -64,7 +64,7 @@ public:
{ {
const Vec3* vlast = &_vertexArrayPtr[first+count]; const Vec3* vlast = &_vertexArrayPtr[first+count];
for(const Vec3* vptr=&_vertexArrayPtr[first];vptr<vlast;vptr+=3) for(const Vec3* vptr=&_vertexArrayPtr[first];vptr<vlast;vptr+=3)
operator()(*(vptr),*(vptr+1),*(vptr+2),_treatVertexDataAsTemporary); this->operator()(*(vptr),*(vptr+1),*(vptr+2),_treatVertexDataAsTemporary);
break; break;
} }
case(GL_TRIANGLE_STRIP): case(GL_TRIANGLE_STRIP):
@ -72,8 +72,8 @@ public:
const Vec3* vptr = &_vertexArrayPtr[first]; const Vec3* vptr = &_vertexArrayPtr[first];
for(GLsizei i=2;i<count;++i,++vptr) for(GLsizei i=2;i<count;++i,++vptr)
{ {
if ((i%2)) operator()(*(vptr),*(vptr+2),*(vptr+1),_treatVertexDataAsTemporary); if ((i%2)) this->operator()(*(vptr),*(vptr+2),*(vptr+1),_treatVertexDataAsTemporary);
else operator()(*(vptr),*(vptr+1),*(vptr+2),_treatVertexDataAsTemporary); else this->operator()(*(vptr),*(vptr+1),*(vptr+2),_treatVertexDataAsTemporary);
} }
break; break;
} }
@ -82,8 +82,8 @@ public:
const Vec3* vptr = &_vertexArrayPtr[first]; const Vec3* vptr = &_vertexArrayPtr[first];
for(GLsizei i=3;i<count;i+=4,vptr+=4) for(GLsizei i=3;i<count;i+=4,vptr+=4)
{ {
operator()(*(vptr),*(vptr+1),*(vptr+2),_treatVertexDataAsTemporary); this->operator()(*(vptr),*(vptr+1),*(vptr+2),_treatVertexDataAsTemporary);
operator()(*(vptr),*(vptr+2),*(vptr+3),_treatVertexDataAsTemporary); this->operator()(*(vptr),*(vptr+2),*(vptr+3),_treatVertexDataAsTemporary);
} }
break; break;
} }
@ -92,8 +92,8 @@ public:
const Vec3* vptr = &_vertexArrayPtr[first]; const Vec3* vptr = &_vertexArrayPtr[first];
for(GLsizei i=3;i<count;i+=2,vptr+=2) for(GLsizei i=3;i<count;i+=2,vptr+=2)
{ {
operator()(*(vptr),*(vptr+1),*(vptr+2),_treatVertexDataAsTemporary); this->operator()(*(vptr),*(vptr+1),*(vptr+2),_treatVertexDataAsTemporary);
operator()(*(vptr+1),*(vptr+3),*(vptr+2),_treatVertexDataAsTemporary); this->operator()(*(vptr+1),*(vptr+3),*(vptr+2),_treatVertexDataAsTemporary);
} }
break; break;
} }
@ -104,7 +104,7 @@ public:
const Vec3* vptr = vfirst+1; const Vec3* vptr = vfirst+1;
for(GLsizei i=2;i<count;++i,++vptr) for(GLsizei i=2;i<count;++i,++vptr)
{ {
operator()(*(vfirst),*(vptr),*(vptr+1),_treatVertexDataAsTemporary); this->operator()(*(vfirst),*(vptr),*(vptr+1),_treatVertexDataAsTemporary);
} }
break; break;
} }
@ -130,7 +130,7 @@ public:
{ {
IndexPointer ilast = &indices[count]; IndexPointer ilast = &indices[count];
for(IndexPointer iptr=indices;iptr<ilast;iptr+=3) for(IndexPointer iptr=indices;iptr<ilast;iptr+=3)
operator()(_vertexArrayPtr[*iptr],_vertexArrayPtr[*(iptr+1)],_vertexArrayPtr[*(iptr+2)],_treatVertexDataAsTemporary); this->operator()(_vertexArrayPtr[*iptr],_vertexArrayPtr[*(iptr+1)],_vertexArrayPtr[*(iptr+2)],_treatVertexDataAsTemporary);
break; break;
} }
case(GL_TRIANGLE_STRIP): case(GL_TRIANGLE_STRIP):
@ -138,8 +138,8 @@ public:
IndexPointer iptr = indices; IndexPointer iptr = indices;
for(GLsizei i=2;i<count;++i,++iptr) for(GLsizei i=2;i<count;++i,++iptr)
{ {
if ((i%2)) operator()(_vertexArrayPtr[*(iptr)],_vertexArrayPtr[*(iptr+2)],_vertexArrayPtr[*(iptr+1)],_treatVertexDataAsTemporary); if ((i%2)) this->operator()(_vertexArrayPtr[*(iptr)],_vertexArrayPtr[*(iptr+2)],_vertexArrayPtr[*(iptr+1)],_treatVertexDataAsTemporary);
else operator()(_vertexArrayPtr[*(iptr)],_vertexArrayPtr[*(iptr+1)],_vertexArrayPtr[*(iptr+2)],_treatVertexDataAsTemporary); else this->operator()(_vertexArrayPtr[*(iptr)],_vertexArrayPtr[*(iptr+1)],_vertexArrayPtr[*(iptr+2)],_treatVertexDataAsTemporary);
} }
break; break;
} }
@ -148,8 +148,8 @@ public:
IndexPointer iptr = indices; IndexPointer iptr = indices;
for(GLsizei i=3;i<count;i+=4,iptr+=4) for(GLsizei i=3;i<count;i+=4,iptr+=4)
{ {
operator()(_vertexArrayPtr[*(iptr)],_vertexArrayPtr[*(iptr+1)],_vertexArrayPtr[*(iptr+2)],_treatVertexDataAsTemporary); this->operator()(_vertexArrayPtr[*(iptr)],_vertexArrayPtr[*(iptr+1)],_vertexArrayPtr[*(iptr+2)],_treatVertexDataAsTemporary);
operator()(_vertexArrayPtr[*(iptr)],_vertexArrayPtr[*(iptr+2)],_vertexArrayPtr[*(iptr+3)],_treatVertexDataAsTemporary); this->operator()(_vertexArrayPtr[*(iptr)],_vertexArrayPtr[*(iptr+2)],_vertexArrayPtr[*(iptr+3)],_treatVertexDataAsTemporary);
} }
break; break;
} }
@ -158,8 +158,8 @@ public:
IndexPointer iptr = indices; IndexPointer iptr = indices;
for(GLsizei i=3;i<count;i+=2,iptr+=2) for(GLsizei i=3;i<count;i+=2,iptr+=2)
{ {
operator()(_vertexArrayPtr[*(iptr)],_vertexArrayPtr[*(iptr+1)],_vertexArrayPtr[*(iptr+2)],_treatVertexDataAsTemporary); this->operator()(_vertexArrayPtr[*(iptr)],_vertexArrayPtr[*(iptr+1)],_vertexArrayPtr[*(iptr+2)],_treatVertexDataAsTemporary);
operator()(_vertexArrayPtr[*(iptr+1)],_vertexArrayPtr[*(iptr+3)],_vertexArrayPtr[*(iptr+2)],_treatVertexDataAsTemporary); this->operator()(_vertexArrayPtr[*(iptr+1)],_vertexArrayPtr[*(iptr+3)],_vertexArrayPtr[*(iptr+2)],_treatVertexDataAsTemporary);
} }
break; break;
} }
@ -171,7 +171,7 @@ public:
++iptr; ++iptr;
for(GLsizei i=2;i<count;++i,++iptr) for(GLsizei i=2;i<count;++i,++iptr)
{ {
operator()(vfirst,_vertexArrayPtr[*(iptr)],_vertexArrayPtr[*(iptr+1)],_treatVertexDataAsTemporary); this->operator()(vfirst,_vertexArrayPtr[*(iptr)],_vertexArrayPtr[*(iptr+1)],_treatVertexDataAsTemporary);
} }
break; break;
} }
@ -198,7 +198,7 @@ public:
IndexPointer ilast = &indices[count]; IndexPointer ilast = &indices[count];
for(IndexPointer iptr=indices;iptr<ilast;iptr+=3) for(IndexPointer iptr=indices;iptr<ilast;iptr+=3)
{ {
operator()(_vertexArrayPtr[*iptr],_vertexArrayPtr[*(iptr+1)],_vertexArrayPtr[*(iptr+2)],_treatVertexDataAsTemporary); this->operator()(_vertexArrayPtr[*iptr],_vertexArrayPtr[*(iptr+1)],_vertexArrayPtr[*(iptr+2)],_treatVertexDataAsTemporary);
} }
break; break;
} }
@ -207,8 +207,8 @@ public:
IndexPointer iptr = indices; IndexPointer iptr = indices;
for(GLsizei i=2;i<count;++i,++iptr) for(GLsizei i=2;i<count;++i,++iptr)
{ {
if ((i%2)) operator()(_vertexArrayPtr[*(iptr)],_vertexArrayPtr[*(iptr+2)],_vertexArrayPtr[*(iptr+1)],_treatVertexDataAsTemporary); if ((i%2)) this->operator()(_vertexArrayPtr[*(iptr)],_vertexArrayPtr[*(iptr+2)],_vertexArrayPtr[*(iptr+1)],_treatVertexDataAsTemporary);
else operator()(_vertexArrayPtr[*(iptr)],_vertexArrayPtr[*(iptr+1)],_vertexArrayPtr[*(iptr+2)],_treatVertexDataAsTemporary); else this->operator()(_vertexArrayPtr[*(iptr)],_vertexArrayPtr[*(iptr+1)],_vertexArrayPtr[*(iptr+2)],_treatVertexDataAsTemporary);
} }
break; break;
} }
@ -217,8 +217,8 @@ public:
IndexPointer iptr = indices; IndexPointer iptr = indices;
for(GLsizei i=3;i<count;i+=4,iptr+=4) for(GLsizei i=3;i<count;i+=4,iptr+=4)
{ {
operator()(_vertexArrayPtr[*(iptr)],_vertexArrayPtr[*(iptr+1)],_vertexArrayPtr[*(iptr+2)],_treatVertexDataAsTemporary); this->operator()(_vertexArrayPtr[*(iptr)],_vertexArrayPtr[*(iptr+1)],_vertexArrayPtr[*(iptr+2)],_treatVertexDataAsTemporary);
operator()(_vertexArrayPtr[*(iptr)],_vertexArrayPtr[*(iptr+2)],_vertexArrayPtr[*(iptr+3)],_treatVertexDataAsTemporary); this->operator()(_vertexArrayPtr[*(iptr)],_vertexArrayPtr[*(iptr+2)],_vertexArrayPtr[*(iptr+3)],_treatVertexDataAsTemporary);
} }
break; break;
} }
@ -227,8 +227,8 @@ public:
IndexPointer iptr = indices; IndexPointer iptr = indices;
for(GLsizei i=3;i<count;i+=2,iptr+=2) for(GLsizei i=3;i<count;i+=2,iptr+=2)
{ {
operator()(_vertexArrayPtr[*(iptr)],_vertexArrayPtr[*(iptr+1)],_vertexArrayPtr[*(iptr+2)],_treatVertexDataAsTemporary); this->operator()(_vertexArrayPtr[*(iptr)],_vertexArrayPtr[*(iptr+1)],_vertexArrayPtr[*(iptr+2)],_treatVertexDataAsTemporary);
operator()(_vertexArrayPtr[*(iptr+1)],_vertexArrayPtr[*(iptr+3)],_vertexArrayPtr[*(iptr+2)],_treatVertexDataAsTemporary); this->operator()(_vertexArrayPtr[*(iptr+1)],_vertexArrayPtr[*(iptr+3)],_vertexArrayPtr[*(iptr+2)],_treatVertexDataAsTemporary);
} }
break; break;
} }
@ -240,7 +240,7 @@ public:
++iptr; ++iptr;
for(GLsizei i=2;i<count;++i,++iptr) for(GLsizei i=2;i<count;++i,++iptr)
{ {
operator()(vfirst,_vertexArrayPtr[*(iptr)],_vertexArrayPtr[*(iptr+1)],_treatVertexDataAsTemporary); this->operator()(vfirst,_vertexArrayPtr[*(iptr)],_vertexArrayPtr[*(iptr+1)],_treatVertexDataAsTemporary);
} }
break; break;
} }
@ -266,7 +266,7 @@ public:
{ {
IndexPointer ilast = &indices[count]; IndexPointer ilast = &indices[count];
for(IndexPointer iptr=indices;iptr<ilast;iptr+=3) for(IndexPointer iptr=indices;iptr<ilast;iptr+=3)
operator()(_vertexArrayPtr[*iptr],_vertexArrayPtr[*(iptr+1)],_vertexArrayPtr[*(iptr+2)],_treatVertexDataAsTemporary); this->operator()(_vertexArrayPtr[*iptr],_vertexArrayPtr[*(iptr+1)],_vertexArrayPtr[*(iptr+2)],_treatVertexDataAsTemporary);
break; break;
} }
case(GL_TRIANGLE_STRIP): case(GL_TRIANGLE_STRIP):
@ -274,8 +274,8 @@ public:
IndexPointer iptr = indices; IndexPointer iptr = indices;
for(GLsizei i=2;i<count;++i,++iptr) for(GLsizei i=2;i<count;++i,++iptr)
{ {
if ((i%2)) operator()(_vertexArrayPtr[*(iptr)],_vertexArrayPtr[*(iptr+2)],_vertexArrayPtr[*(iptr+1)],_treatVertexDataAsTemporary); if ((i%2)) this->operator()(_vertexArrayPtr[*(iptr)],_vertexArrayPtr[*(iptr+2)],_vertexArrayPtr[*(iptr+1)],_treatVertexDataAsTemporary);
else operator()(_vertexArrayPtr[*(iptr)],_vertexArrayPtr[*(iptr+1)],_vertexArrayPtr[*(iptr+2)],_treatVertexDataAsTemporary); else this->operator()(_vertexArrayPtr[*(iptr)],_vertexArrayPtr[*(iptr+1)],_vertexArrayPtr[*(iptr+2)],_treatVertexDataAsTemporary);
} }
break; break;
} }
@ -284,8 +284,8 @@ public:
IndexPointer iptr = indices; IndexPointer iptr = indices;
for(GLsizei i=3;i<count;i+=4,iptr+=4) for(GLsizei i=3;i<count;i+=4,iptr+=4)
{ {
operator()(_vertexArrayPtr[*(iptr)],_vertexArrayPtr[*(iptr+1)],_vertexArrayPtr[*(iptr+2)],_treatVertexDataAsTemporary); this->operator()(_vertexArrayPtr[*(iptr)],_vertexArrayPtr[*(iptr+1)],_vertexArrayPtr[*(iptr+2)],_treatVertexDataAsTemporary);
operator()(_vertexArrayPtr[*(iptr)],_vertexArrayPtr[*(iptr+2)],_vertexArrayPtr[*(iptr+3)],_treatVertexDataAsTemporary); this->operator()(_vertexArrayPtr[*(iptr)],_vertexArrayPtr[*(iptr+2)],_vertexArrayPtr[*(iptr+3)],_treatVertexDataAsTemporary);
} }
break; break;
} }
@ -294,8 +294,8 @@ public:
IndexPointer iptr = indices; IndexPointer iptr = indices;
for(GLsizei i=3;i<count;i+=2,iptr+=2) for(GLsizei i=3;i<count;i+=2,iptr+=2)
{ {
operator()(_vertexArrayPtr[*(iptr)],_vertexArrayPtr[*(iptr+1)],_vertexArrayPtr[*(iptr+2)],_treatVertexDataAsTemporary); this->operator()(_vertexArrayPtr[*(iptr)],_vertexArrayPtr[*(iptr+1)],_vertexArrayPtr[*(iptr+2)],_treatVertexDataAsTemporary);
operator()(_vertexArrayPtr[*(iptr+1)],_vertexArrayPtr[*(iptr+3)],_vertexArrayPtr[*(iptr+2)],_treatVertexDataAsTemporary); this->operator()(_vertexArrayPtr[*(iptr+1)],_vertexArrayPtr[*(iptr+3)],_vertexArrayPtr[*(iptr+2)],_treatVertexDataAsTemporary);
} }
break; break;
} }
@ -307,7 +307,7 @@ public:
++iptr; ++iptr;
for(GLsizei i=2;i<count;++i,++iptr) for(GLsizei i=2;i<count;++i,++iptr)
{ {
operator()(vfirst,_vertexArrayPtr[*(iptr)],_vertexArrayPtr[*(iptr+1)],_treatVertexDataAsTemporary); this->operator()(vfirst,_vertexArrayPtr[*(iptr)],_vertexArrayPtr[*(iptr+1)],_treatVertexDataAsTemporary);
} }
break; break;
} }

View File

@ -65,7 +65,7 @@ public:
unsigned int pos=first; unsigned int pos=first;
for(GLsizei i=2;i<count;i+=3,pos+=3) for(GLsizei i=2;i<count;i+=3,pos+=3)
{ {
operator()(pos,pos+1,pos+2); this->operator()(pos,pos+1,pos+2);
} }
break; break;
} }
@ -74,8 +74,8 @@ public:
unsigned int pos=first; unsigned int pos=first;
for(GLsizei i=2;i<count;++i,++pos) for(GLsizei i=2;i<count;++i,++pos)
{ {
if ((i%2)) operator()(pos,pos+2,pos+1); if ((i%2)) this->operator()(pos,pos+2,pos+1);
else operator()(pos,pos+1,pos+2); else this->operator()(pos,pos+1,pos+2);
} }
break; break;
} }
@ -84,8 +84,8 @@ public:
unsigned int pos=first; unsigned int pos=first;
for(GLsizei i=3;i<count;i+=4,pos+=4) for(GLsizei i=3;i<count;i+=4,pos+=4)
{ {
operator()(pos,pos+1,pos+2); this->operator()(pos,pos+1,pos+2);
operator()(pos,pos+2,pos+3); this->operator()(pos,pos+2,pos+3);
} }
break; break;
} }
@ -94,8 +94,8 @@ public:
unsigned int pos=first; unsigned int pos=first;
for(GLsizei i=3;i<count;i+=2,pos+=2) for(GLsizei i=3;i<count;i+=2,pos+=2)
{ {
operator()(pos,pos+1,pos+2); this->operator()(pos,pos+1,pos+2);
operator()(pos+1,pos+3,pos+2); this->operator()(pos+1,pos+3,pos+2);
} }
break; break;
} }
@ -105,7 +105,7 @@ public:
unsigned int pos=first+1; unsigned int pos=first+1;
for(GLsizei i=2;i<count;++i,++pos) for(GLsizei i=2;i<count;++i,++pos)
{ {
operator()(first,pos,pos+1); this->operator()(first,pos,pos+1);
} }
break; break;
} }
@ -131,7 +131,7 @@ public:
{ {
IndexPointer ilast = &indices[count]; IndexPointer ilast = &indices[count];
for(IndexPointer iptr=indices;iptr<ilast;iptr+=3) for(IndexPointer iptr=indices;iptr<ilast;iptr+=3)
operator()(*iptr,*(iptr+1),*(iptr+2)); this->operator()(*iptr,*(iptr+1),*(iptr+2));
break; break;
} }
case(GL_TRIANGLE_STRIP): case(GL_TRIANGLE_STRIP):
@ -139,8 +139,8 @@ public:
IndexPointer iptr = indices; IndexPointer iptr = indices;
for(GLsizei i=2;i<count;++i,++iptr) for(GLsizei i=2;i<count;++i,++iptr)
{ {
if ((i%2)) operator()(*(iptr),*(iptr+2),*(iptr+1)); if ((i%2)) this->operator()(*(iptr),*(iptr+2),*(iptr+1));
else operator()(*(iptr),*(iptr+1),*(iptr+2)); else this->operator()(*(iptr),*(iptr+1),*(iptr+2));
} }
break; break;
} }
@ -149,8 +149,8 @@ public:
IndexPointer iptr = indices; IndexPointer iptr = indices;
for(GLsizei i=3;i<count;i+=4,iptr+=4) for(GLsizei i=3;i<count;i+=4,iptr+=4)
{ {
operator()(*(iptr),*(iptr+1),*(iptr+2)); this->operator()(*(iptr),*(iptr+1),*(iptr+2));
operator()(*(iptr),*(iptr+2),*(iptr+3)); this->operator()(*(iptr),*(iptr+2),*(iptr+3));
} }
break; break;
} }
@ -159,8 +159,8 @@ public:
IndexPointer iptr = indices; IndexPointer iptr = indices;
for(GLsizei i=3;i<count;i+=2,iptr+=2) for(GLsizei i=3;i<count;i+=2,iptr+=2)
{ {
operator()(*(iptr),*(iptr+1),*(iptr+2)); this->operator()(*(iptr),*(iptr+1),*(iptr+2));
operator()(*(iptr+1),*(iptr+3),*(iptr+2)); this->operator()(*(iptr+1),*(iptr+3),*(iptr+2));
} }
break; break;
} }
@ -172,7 +172,7 @@ public:
++iptr; ++iptr;
for(GLsizei i=2;i<count;++i,++iptr) for(GLsizei i=2;i<count;++i,++iptr)
{ {
operator()(first,*(iptr),*(iptr+1)); this->operator()(first,*(iptr),*(iptr+1));
} }
break; break;
} }
@ -198,7 +198,7 @@ public:
{ {
IndexPointer ilast = &indices[count]; IndexPointer ilast = &indices[count];
for(IndexPointer iptr=indices;iptr<ilast;iptr+=3) for(IndexPointer iptr=indices;iptr<ilast;iptr+=3)
operator()(*iptr,*(iptr+1),*(iptr+2)); this->operator()(*iptr,*(iptr+1),*(iptr+2));
break; break;
} }
case(GL_TRIANGLE_STRIP): case(GL_TRIANGLE_STRIP):
@ -206,8 +206,8 @@ public:
IndexPointer iptr = indices; IndexPointer iptr = indices;
for(GLsizei i=2;i<count;++i,++iptr) for(GLsizei i=2;i<count;++i,++iptr)
{ {
if ((i%2)) operator()(*(iptr),*(iptr+2),*(iptr+1)); if ((i%2)) this->operator()(*(iptr),*(iptr+2),*(iptr+1));
else operator()(*(iptr),*(iptr+1),*(iptr+2)); else this->operator()(*(iptr),*(iptr+1),*(iptr+2));
} }
break; break;
} }
@ -216,8 +216,8 @@ public:
IndexPointer iptr = indices; IndexPointer iptr = indices;
for(GLsizei i=3;i<count;i+=4,iptr+=4) for(GLsizei i=3;i<count;i+=4,iptr+=4)
{ {
operator()(*(iptr),*(iptr+1),*(iptr+2)); this->operator()(*(iptr),*(iptr+1),*(iptr+2));
operator()(*(iptr),*(iptr+2),*(iptr+3)); this->operator()(*(iptr),*(iptr+2),*(iptr+3));
} }
break; break;
} }
@ -226,8 +226,8 @@ public:
IndexPointer iptr = indices; IndexPointer iptr = indices;
for(GLsizei i=3;i<count;i+=2,iptr+=2) for(GLsizei i=3;i<count;i+=2,iptr+=2)
{ {
operator()(*(iptr),*(iptr+1),*(iptr+2)); this->operator()(*(iptr),*(iptr+1),*(iptr+2));
operator()(*(iptr+1),*(iptr+3),*(iptr+2)); this->operator()(*(iptr+1),*(iptr+3),*(iptr+2));
} }
break; break;
} }
@ -239,7 +239,7 @@ public:
++iptr; ++iptr;
for(GLsizei i=2;i<count;++i,++iptr) for(GLsizei i=2;i<count;++i,++iptr)
{ {
operator()(first,*(iptr),*(iptr+1)); this->operator()(first,*(iptr),*(iptr+1));
} }
break; break;
} }
@ -265,7 +265,7 @@ public:
{ {
IndexPointer ilast = &indices[count]; IndexPointer ilast = &indices[count];
for(IndexPointer iptr=indices;iptr<ilast;iptr+=3) for(IndexPointer iptr=indices;iptr<ilast;iptr+=3)
operator()(*iptr,*(iptr+1),*(iptr+2)); this->operator()(*iptr,*(iptr+1),*(iptr+2));
break; break;
} }
case(GL_TRIANGLE_STRIP): case(GL_TRIANGLE_STRIP):
@ -273,8 +273,8 @@ public:
IndexPointer iptr = indices; IndexPointer iptr = indices;
for(GLsizei i=2;i<count;++i,++iptr) for(GLsizei i=2;i<count;++i,++iptr)
{ {
if ((i%2)) operator()(*(iptr),*(iptr+2),*(iptr+1)); if ((i%2)) this->operator()(*(iptr),*(iptr+2),*(iptr+1));
else operator()(*(iptr),*(iptr+1),*(iptr+2)); else this->operator()(*(iptr),*(iptr+1),*(iptr+2));
} }
break; break;
} }
@ -283,8 +283,8 @@ public:
IndexPointer iptr = indices; IndexPointer iptr = indices;
for(GLsizei i=3;i<count;i+=4,iptr+=4) for(GLsizei i=3;i<count;i+=4,iptr+=4)
{ {
operator()(*(iptr),*(iptr+1),*(iptr+2)); this->operator()(*(iptr),*(iptr+1),*(iptr+2));
operator()(*(iptr),*(iptr+2),*(iptr+3)); this->operator()(*(iptr),*(iptr+2),*(iptr+3));
} }
break; break;
} }
@ -293,8 +293,8 @@ public:
IndexPointer iptr = indices; IndexPointer iptr = indices;
for(GLsizei i=3;i<count;i+=2,iptr+=2) for(GLsizei i=3;i<count;i+=2,iptr+=2)
{ {
operator()(*(iptr),*(iptr+1),*(iptr+2)); this->operator()(*(iptr),*(iptr+1),*(iptr+2));
operator()(*(iptr+1),*(iptr+3),*(iptr+2)); this->operator()(*(iptr+1),*(iptr+3),*(iptr+2));
} }
break; break;
} }
@ -306,7 +306,7 @@ public:
++iptr; ++iptr;
for(GLsizei i=2;i<count;++i,++iptr) for(GLsizei i=2;i<count;++i,++iptr)
{ {
operator()(first,*(iptr),*(iptr+1)); this->operator()(first,*(iptr),*(iptr+1));
} }
break; break;
} }

View File

@ -4,11 +4,14 @@ osgversion
echo osglogo echo osglogo
osglogo osglogo
echo osgviewer cow.osg
osgviewer cow.osg
echo osgfxbrowser dumptruck.osg echo osgfxbrowser dumptruck.osg
osgfxbrowser dumptruck.osg osgfxbrowser dumptruck.osg
echo osgviewer cow.osg echo osgshaders
osgviewer cow.osg osgshaders
echo osgkeyboard echo osgkeyboard
osgkeyboard osgkeyboard

View File

@ -894,9 +894,9 @@ namespace lwo2
for (int i=0; i<4; ++i) tag += *(it++); for (int i=0; i<4; ++i) tag += *(it++);
unsigned int len = ((static_cast<unsigned int>(*(it++)) & 0xFF) << 8) | unsigned int len = ((static_cast<unsigned int>(*(it++)) & 0xFF) << 8) |
(static_cast<unsigned int>(*(it++)) & 0xFF); (static_cast<unsigned int>(*(it++)) & 0xFF);
os() << "DEBUG INFO: lwo2parser: reading subchunk " << tag << ", length = " << len << ", context = " << context << "\n"; this->os() << "DEBUG INFO: lwo2parser: reading subchunk " << tag << ", length = " << len << ", context = " << context << "\n";
iff::Chunk *chk = parse_chunk_data(tag, context, it, it+len); iff::Chunk *chk = parse_chunk_data(tag, context, it, it+len);
if (!chk) os() << "DEBUG INFO: lwo2parser: \tprevious subchunk not handled\n"; if (!chk) this->os() << "DEBUG INFO: lwo2parser: \tprevious subchunk not handled\n";
it += len; it += len;
if ((len % 2) != 0) ++it; if ((len % 2) != 0) ++it;
return chk; return chk;

View File

@ -369,7 +369,7 @@ inline void graph_array<nodetype, arctype>::erase_arcs(const node_iterator & Ini
template <class nodetype, class arctype> template <class nodetype, class arctype>
inline void graph_array<nodetype, arctype>::erase_arcs() { inline void graph_array<nodetype, arctype>::erase_arcs() {
m_NbArcs = 0; m_NbArcs = 0;
for (nodeid i = 0; i < Size(); ++i) for (nodeid i = 0; i < this->Size(); ++i)
m_Nodes[i].m_OutArcs.clear(); m_Nodes[i].m_OutArcs.clear();
} }