Changeset 4214 in orxonox.OLD for orxonox/branches/md2_loader/src/lib
- Timestamp:
- May 18, 2005, 2:15:59 AM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/branches/md2_loader/src/lib/graphics/importer/md2Model.cc
r4213 r4214 513 513 this->scaleFactor = 0.1f; 514 514 515 this->setAnim( 0);515 this->setAnim(STAND); 516 516 } 517 517 … … 603 603 604 604 605 void MD2Model2::tick(float time)606 {607 this->animationState.localTime += time;608 }609 610 void MD2Model2::draw()611 {612 if( likely(this->animationState.localTime > 0.0))613 this->animate();614 615 glPushMatrix();616 /* rotate because id software uses another orientation then the openGL default */617 /* \todo: rotate the axis already when loading... easy :) */618 glRotatef(-90.0, 1.0, 0.0, 0.0);619 glRotatef(-90.0, 0.0, 0.0, 1.0);620 621 this->renderFrame();622 623 glPopMatrix();624 }625 626 627 605 /** 628 606 \brief initializes an array of vert with the current frame scaled vertices … … 667 645 this->animationState.fps = animationList[type].fps; 668 646 this->animationState.type = type; 669 670 647 } 671 648 … … 699 676 } 700 677 678 void MD2Model2::tick(float time) 679 { 680 this->animationState.localTime += time; 681 } 682 683 684 void MD2Model2::draw() 685 { 686 if( likely(this->animationState.localTime > 0.0)) 687 this->animate(); 688 689 glPushMatrix(); 690 /* rotate because id software uses another orientation then the openGL default */ 691 /* \todo: rotate the axis already when loading... easy :) */ 692 glRotatef(-90.0, 1.0, 0.0, 0.0); 693 glRotatef(-90.0, 0.0, 0.0, 1.0); 694 695 this->renderFrame(); 696 697 glPopMatrix(); 698 } 699 701 700 702 701 void MD2Model2::renderFrame() … … 706 705 707 706 /* some face culling stuff */ 708 //glPushAttrib(GL_POLYGON_BIT);709 //glFrontFace(GL_CW);710 //glEnable(GL_CULL_FACE);711 //glCullFace(GL_BACK);707 glPushAttrib(GL_POLYGON_BIT); 708 glFrontFace(GL_CW); 709 glEnable(GL_CULL_FACE); 710 glCullFace(GL_BACK); 712 711 713 712 this->processLighting(); … … 732 731 { 733 732 /* for quake2 lighting */ 734 float l = shadeDots[this->pLightNormals[pCommands[2]]];733 //float l = shadeDots[this->pLightNormals[pCommands[2]]]; 735 734 //glColor3f(l * lcolor[0], l * lcolor[1], l * lcolor[2]); 736 735 … … 741 740 glEnd(); 742 741 } 743 //glDisable(GL_CULL_FACE);744 //glPopAttrib();745 } 746 742 glDisable(GL_CULL_FACE); 743 glPopAttrib(); 744 } 745
Note: See TracChangeset
for help on using the changeset viewer.