Changeset 9974 in orxonox.OLD for branches/playability/src/world_entities
- Timestamp:
- Nov 29, 2006, 5:02:13 PM (18 years ago)
- Location:
- branches/playability/src/world_entities
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/playability/src/world_entities/test_entity2.cc
r9969 r9974 29 29 #include "player.h" 30 30 #include "playable.h" 31 #include "material.h" 31 32 32 33 … … 76 77 this->registerObject(this, TestEntity2::_objectList); 77 78 this->toList(OM_GROUP_00); 79 80 this->material = new Material(); 81 this->material->setIllum(3); 82 this->material->setDiffuse(0.0,0.0,0.0); 83 this->material->setSpecular(0.0,0.0,0.0); 84 this->material->setAmbient(1.0, 0.0, 1.0); 85 86 // this->material->setDiffuseMap("maps/"); 78 87 } 79 88 … … 90 99 void TestEntity2::draw() const 91 100 { 92 // if(!mediaLoaded)93 // false;94 101 95 // glPushAttrib(GL_ENABLE_BIT);96 // glDisable(GL_LIGHTING);97 // glDisable(GL_BLEND);98 //99 // glEnable(GL_TEXTURE_2D);100 // glBindTexture(GL_TEXTURE_2D, media_container->getFrameTexture(counter));101 102 103 glPushMatrix(); 102 104 glMatrixMode(GL_MODELVIEW); 103 glPushMatrix(); 105 104 106 105 107 /* translate */ … … 112 114 //PRINTF(0)("axis: %f\n", axis); 113 115 114 glColor3f(1.0, 0, 0); 116 this->material->select(); 117 118 glColor3f(0.0, 1.0, 0.0); 115 119 116 120 glBegin(GL_QUADS); 117 121 glVertex3f( 0.0f, -10.0f, 0.0f); 118 glNormal3f( 0.0, 1.0, 0.0);122 glNormal3f(1.0, 0.0, 0.0); 119 123 // glTexCoord2f(1.0f, 1.0f); 120 124 glVertex3f( 0.0f, -10.0f , 20.0f); 121 glNormal3f( 0.0, 1.0, 0.0);125 glNormal3f(1.0, 0.0, 0.0); 122 126 123 127 // glTexCoord2f(0.0f, 1.0f); 124 glVertex3f( 0 , 10.0f , 20.0f );125 glNormal3f( 0.0, 1.0, 0.0);128 glVertex3f( 0.0, 10.0f , 20.0f ); 129 glNormal3f(1.0, 0.0, 0.0); 126 130 127 131 // glTexCoord2f(0.0f, 0.0f); 128 glVertex3f( 0 , 10.0f, 0.0f );129 glNormal3f( 0.0, 1.0, 0.0);132 glVertex3f( 0.0, 10.0f, 0.0f ); 133 glNormal3f(1.0, 0.0, 0.0); 130 134 131 135 // glTexCoord2f(1.0f, 0.0f); 132 136 133 137 glEnd(); 134 138 135 139 glPopMatrix(); 136 // glPopAttrib();140 // glPopAttrib(); 137 141 } 138 142 -
branches/playability/src/world_entities/test_entity2.h
r9969 r9974 5 5 6 6 class TiXmlElement; 7 7 class Material; 8 8 9 9 class TestEntity2 : public WorldEntity … … 23 23 virtual void draw() const; 24 24 25 private: 26 Material* material; 25 27 }; 26 28
Note: See TracChangeset
for help on using the changeset viewer.