Changeset 3602 in orxonox.OLD for orxonox/trunk/src/light.cc
- Timestamp:
- Mar 18, 2005, 10:07:40 AM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/src/light.cc
r3600 r3602 33 33 Light::Light(int lightNumber) 34 34 { 35 this->setClassName("Light"); 36 char tmpName[7]; 37 sprintf(tmpName, "Light%d", lightNumber); 38 this->setName(tmpName); 39 35 40 PRINTF(4)("initializing Light number %d.\n", lightNumber); 36 41 // enable The light … … 165 170 void Light::draw() 166 171 { 167 float pos[3] = {this->getAbsCoor ().x, this->getAbsCoor().y, this->getAbsCoor().z}; 172 float pos[4] = {this->getAbsCoor().x, this->getAbsCoor().y, this->getAbsCoor().z, 1.0}; 173 PRINTF(4)("Drawing The Lights new Position at %f %f %f\n", pos[0], pos[1], pos[2]); 168 174 glLightfv(lightsV[this->lightNumber], GL_POSITION, pos); 169 175 } … … 331 337 glMatrixMode(GL_MODELVIEW); 332 338 glLoadIdentity(); 333 for (int i; i < NUMBEROFLIGHTS; i++) 339 PRINTF(4)("Drawing the Lights\n"); 340 for (int i = 0; i < NUMBEROFLIGHTS; i++) 334 341 if (this->lights[i]) 335 342 lights[i]->draw(); 336 343 } 337 344
Note: See TracChangeset
for help on using the changeset viewer.