- Timestamp:
- May 20, 2005, 1:59:38 AM (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/branches/md2_loader/src/lib/graphics/importer/md2Model.cc
r4235 r4236 589 589 pVertex[j][0] = (frame->pVertices[j].v[0] * frame->scale[0]) + frame->translate[0]; 590 590 pVertex[j][1] = (frame->pVertices[j].v[2] * frame->scale[2]) + frame->translate[2]; 591 pVertex[j][2] = - (frame->pVertices[j].v[1] * frame->scale[1]) + frame->translate[1];591 pVertex[j][2] = -1.0 * (frame->pVertices[j].v[1] * frame->scale[1]) + frame->translate[1]; 592 592 593 593 //printf("pVertex %f, %f, %f\n", pVertex[j][0], pVertex[j][1], pVertex[j][2]); … … 701 701 702 702 glPushMatrix(); 703 /* rotate because id software uses another orientation then the openGL default */704 /* \todo: rotate the axis already when loading... easy :) */705 //glRotatef(-90.0, 1.0, 0.0, 0.0);706 //glRotatef(-90.0, 0.0, 0.0, 1.0);707 703 708 704 this->renderFrame(); 709 705 710 706 glPopMatrix(); 711 }712 713 714 void MD2Model2::draw2()715 {716 glBegin(GL_TRIANGLES);717 for(int j = 0; j < this->numTriangles; j++)718 {719 for(int whichVertex = 0; whichVertex < 3; whichVertex++)720 {721 /*722 int index = pObject->pFaces[j].vertIndex[whichVertex];723 int index2 = pObject->pFaces[j].coordIndex[whichVertex];724 glNormal3f(-pObject->pNormals[index].x, -pObject->pNormals[index].y, -pObject->pNormals[index].z);725 726 if( likely(pObject->pTexVerts != NULL))727 {728 glTexCoord2f(pObject->pTexVerts[index2].x, pObject->pTexVerts[index2].y);729 }730 glVertex3f(pObject->pVerts[index].x, pObject->pVerts[index].y, pObject->pVerts[index].z);731 */732 }733 }734 glEnd();735 707 } 736 708
Note: See TracChangeset
for help on using the changeset viewer.