Changeset 6004 in orxonox.OLD for trunk/src/world_entities/npcs/npc_test.cc
- Timestamp:
- Dec 9, 2005, 11:12:04 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/world_entities/npcs/npc_test.cc
r5750 r6004 33 33 NPC2::NPC2() 34 34 { 35 this->setClassID(CL_NPC , "NPC");35 this->setClassID(CL_NPC_TEST2, "NPC2"); 36 36 37 37 if ((float)rand()/RAND_MAX > .5f) … … 83 83 void NPC2::draw() const 84 84 { 85 glMatrixMode(GL_MODELVIEW);86 glPushMatrix();87 float matrix[4][4];88 89 /* translate */90 glTranslatef (this->getAbsCoor ().x,91 this->getAbsCoor ().y,92 this->getAbsCoor ().z);93 /* rotate */94 this->getAbsDir ().matrix (matrix);95 glMultMatrixf((float*)matrix);96 97 if (this->shader != NULL && this->shader != Shader::getActiveShader())98 shader->activateShader();99 gluSphere(this->obj, 3, 10, 10);100 shader->deactivateShader();101 102 103 / * if (this->model)104 this->model->draw();*/105 glPopMatrix();85 // glMatrixMode(GL_MODELVIEW); 86 // glPushMatrix(); 87 // float matrix[4][4]; 88 // 89 // /* translate */ 90 // glTranslatef (this->getAbsCoor ().x, 91 // this->getAbsCoor ().y, 92 // this->getAbsCoor ().z); 93 // /* rotate */ 94 // this->getAbsDir ().matrix (matrix); 95 // glMultMatrixf((float*)matrix); 96 // 97 // if (this->shader != NULL && this->shader != Shader::getActiveShader()) 98 // shader->activateShader(); 99 // gluSphere(this->obj, 3, 10, 10); 100 // shader->deactivateShader(); 101 // 102 // 103 // /* if (this->model) 104 // this->model->draw();*/ 105 // glPopMatrix(); 106 106 } 107 107
Note: See TracChangeset
for help on using the changeset viewer.