Changeset 4800 in orxonox.OLD for orxonox/trunk/src/lib/graphics/importer
- Timestamp:
- Jul 6, 2005, 3:59:44 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/src/lib/graphics/importer/model.cc
r4799 r4800 236 236 */ 237 237 238 if(unlikely(this->triangles == NULL))239 return;240 241 238 const GLfloat* pVertices = NULL; 242 239 … … 253 250 glVertex3f(pVertices[0], pVertices[1], pVertices[2]); 254 251 255 256 // glVertex3fv(&this->vertices->getArray()[this->triangles[i].indexToVertices[1]]);257 // glVertex3fv(&this->vertices->getArray()[this->triangles[i].indexToVertices[2]]);258 252 } 259 253 glEnd(); … … 921 915 for( int j = 0; j < 3; ++j) 922 916 { 923 this->triangles[index].indexToVertices[j] = (unsigned int)tmpElem->vertexNumber ;924 this->triangles[index].indexToTexCoor[j] = (unsigned int)tmpElem->texCoordNumber ;917 this->triangles[index].indexToVertices[j] = (unsigned int)tmpElem->vertexNumber * 3; 918 this->triangles[index].indexToTexCoor[j] = (unsigned int)tmpElem->texCoordNumber * 3; 925 919 tmpElem = tmpElem->next; 926 920 } … … 930 924 { 931 925 932 this->triangles[index].indexToVertices[0] = (unsigned int)tmpElem->vertexNumber ;933 this->triangles[index].indexToTexCoor[0] = (unsigned int)tmpElem->texCoordNumber ;934 935 this->triangles[index + 1].indexToVertices[0] = (unsigned int)tmpElem->vertexNumber ;936 this->triangles[index + 1].indexToTexCoor[0] = (unsigned int)tmpElem->texCoordNumber ;926 this->triangles[index].indexToVertices[0] = (unsigned int)tmpElem->vertexNumber * 3; 927 this->triangles[index].indexToTexCoor[0] = (unsigned int)tmpElem->texCoordNumber * 3; 928 929 this->triangles[index + 1].indexToVertices[0] = (unsigned int)tmpElem->vertexNumber * 3; 930 this->triangles[index + 1].indexToTexCoor[0] = (unsigned int)tmpElem->texCoordNumber * 3; 937 931 tmpElem = tmpElem->next; 938 932 939 this->triangles[index].indexToVertices[1] = (unsigned int)tmpElem->vertexNumber ;940 this->triangles[index].indexToTexCoor[1] = (unsigned int)tmpElem->texCoordNumber ;941 942 this->triangles[index + 1].indexToVertices[1] = (unsigned int)tmpElem->vertexNumber ;943 this->triangles[index + 1].indexToTexCoor[1] = (unsigned int)tmpElem->texCoordNumber ;933 this->triangles[index].indexToVertices[1] = (unsigned int)tmpElem->vertexNumber * 3; 934 this->triangles[index].indexToTexCoor[1] = (unsigned int)tmpElem->texCoordNumber * 3; 935 936 this->triangles[index + 1].indexToVertices[1] = (unsigned int)tmpElem->vertexNumber * 3; 937 this->triangles[index + 1].indexToTexCoor[1] = (unsigned int)tmpElem->texCoordNumber * 3; 944 938 tmpElem = tmpElem->next; 945 939 946 this->triangles[index].indexToVertices[2] = (unsigned int)tmpElem->vertexNumber ;947 this->triangles[index].indexToTexCoor[2] = (unsigned int)tmpElem->texCoordNumber ;940 this->triangles[index].indexToVertices[2] = (unsigned int)tmpElem->vertexNumber * 3; 941 this->triangles[index].indexToTexCoor[2] = (unsigned int)tmpElem->texCoordNumber * 3; 948 942 tmpElem = tmpElem->next; 949 943 950 this->triangles[index + 1].indexToVertices[2] = (unsigned int)tmpElem->vertexNumber ;951 this->triangles[index + 1].indexToTexCoor[2] = (unsigned int)tmpElem->texCoordNumber ;944 this->triangles[index + 1].indexToVertices[2] = (unsigned int)tmpElem->vertexNumber * 3; 945 this->triangles[index + 1].indexToTexCoor[2] = (unsigned int)tmpElem->texCoordNumber * 3; 952 946 953 947 index += 2;
Note: See TracChangeset
for help on using the changeset viewer.