Changeset 3602 in orxonox.OLD for orxonox/trunk/src
- Timestamp:
- Mar 18, 2005, 10:07:40 AM (20 years ago)
- Location:
- orxonox/trunk/src
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/src/defs/debug.h
r3601 r3602 59 59 #define DEBUG_MODULE_ORXONOX 0 60 60 #define DEBUG_MODULE_WORLD 0 61 #define DEBUG_MODULE_PNODE 061 #define DEBUG_MODULE_PNODE 2 62 62 #define DEBUG_MODULE_WORLD_ENTITY 0 63 63 #define DEBUG_MODULE_COMMAND_NODE 0 64 64 65 65 #define DEBUG_MODULE_IMPORTER 0 66 #define DEBUG_MODULE_TRACK_MANAGER 367 #define DEBUG_MODULE_LIGHT 066 #define DEBUG_MODULE_TRACK_MANAGER 0 67 #define DEBUG_MODULE_LIGHT 3 68 68 #define DEBUG_MODULE_PLAYER 0 69 69 #define DEBUG_MODULE_MATH 0 -
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 -
orxonox/trunk/src/story_entities/world.cc
r3598 r3602 167 167 this->glmis->step(); 168 168 169 // LIGHT initialisation 170 lightMan = LightManager::getInstance(); 171 lightMan->setAmbientColor(.1,.1,.1); 172 lightMan->addLight(); 173 // lightMan->setAttenuation(1.0, 2, 5); 174 // lightMan->setDiffuseColor(1,1,1); 175 // lightMan->addLight(1); 176 // lightMan->setPosition(20, 10, -20); 177 // lightMan->setDiffuseColor(0,0,0); 178 lightMan->debug(); 179 169 180 switch(this->debugWorldNr) 170 181 { … … 177 188 case DEBUG_WORLD_0: 178 189 { 190 lightMan->setPosition(-5.0, 10.0, -40.0); 179 191 this->nullParent = NullParent::getInstance (); 180 192 this->nullParent->setName ("NullParent"); … … 245 257 case DEBUG_WORLD_1: 246 258 { 259 lightMan->setPosition(.0, .0, .0); 247 260 this->nullParent = NullParent::getInstance (); 248 261 this->nullParent->setName ("NullParent"); … … 274 287 this->spawn(pr, this->localPlayer, es, qs, PNODE_ROTATE_AND_MOVE); 275 288 289 lightMan->getLight(0)->setParent(trackManager->getTrackNode()); 276 290 break; 277 291 } … … 296 310 terrain->setRelCoor(new Vector(0,-10,0)); 297 311 this->spawn(terrain); 298 // LIGHT initialisation299 lightMan = LightManager::getInstance();300 lightMan->setAmbientColor(.1,.1,.1);301 lightMan->addLight();302 lightMan->setPosition(-5.0, 10.0, -40.0);303 lightMan->setAttenuation(1.0, 2, 5);304 lightMan->setDiffuseColor(1,1,1);305 // lightMan->addLight(1);306 // lightMan->setPosition(20, 10, -20);307 // lightMan->setDiffuseColor(0,0,0);308 lightMan->debug();309 310 312 311 313 } … … 465 467 testFont->printText(0, 0, 1, "orxonox_" PACKAGE_VERSION); 466 468 467 lightMan->draw(); 469 lightMan->draw(); // must be at the end of the drawing procedure, otherwise Light cannot be handled as PNodes // 468 470 } 469 471
Note: See TracChangeset
for help on using the changeset viewer.