Changeset 3073 in orxonox.OLD for orxonox/trunk/importer
- Timestamp:
- Dec 3, 2004, 11:08:20 PM (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/importer/object.cc
r3072 r3073 479 479 } 480 480 if (vertex) 481 tmpElem->vertexNumber = atoi(vertex) ;481 tmpElem->vertexNumber = atoi(vertex)-1; 482 482 else 483 tmpElem->vertexNumber = 0;483 tmpElem->vertexNumber = -1; 484 484 if (texture) 485 tmpElem->texCoordNumber = atoi(texture) ;485 tmpElem->texCoordNumber = atoi(texture)-1; 486 486 else 487 tmpElem->texCoordNumber = 0;487 tmpElem->texCoordNumber = -1; 488 488 if (normal) 489 tmpElem->normalNumber = atoi(normal) ;489 tmpElem->normalNumber = atoi(normal)-1; 490 490 else 491 tmpElem->normalNumber = 0;491 tmpElem->normalNumber = -1; 492 492 493 493 faceString += tmpLen; … … 756 756 printf ("importing grafical Element to openGL.\n"); 757 757 758 if (elem->texCoordNumber )759 glTexCoord2fv(vTexture->getArray() +(elem->texCoordNumber-1)*2);760 if (elem->normalNumber )761 glNormal3fv(normals->getArray() + (elem->normalNumber-1)*3);762 if (elem->vertexNumber )763 glVertex3fv(vertices->getArray() + (elem->vertexNumber-1)*3);758 if (elem->texCoordNumber != -1) 759 glTexCoord2fv(vTexture->getArray() + elem->texCoordNumber * 2); 760 if (elem->normalNumber != -1) 761 glNormal3fv(normals->getArray() + elem->normalNumber * 3); 762 if (elem->vertexNumber != -1) 763 glVertex3fv(vertices->getArray() + elem->vertexNumber * 3); 764 764 765 765 }
Note: See TracChangeset
for help on using the changeset viewer.