Changeset 8037 in orxonox.OLD for trunk/src/story_entities
- Timestamp:
- May 31, 2006, 4:52:34 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/story_entities/game_world.cc
r7919 r8037 496 496 LightManager::getInstance()->draw(); 497 497 // draw everything to be included in the reflection 498 for (unsigned int i = 0; i < this->dataTank->drawLists.size(); ++i) 499 this->drawEntityList(State::getObjectManager()->getObjectList(this->dataTank->drawLists[i])); 498 this->drawEntityList(State::getObjectManager()->getReflectionList()); 499 // for (unsigned int i = 0; i < this->dataTank->drawLists.size(); ++i) 500 // this->drawEntityList(State::getObjectManager()->getObjectList(this->dataTank->drawLists[i])); 500 501 501 502 // clean up from reflection rendering … … 511 512 */ 512 513 void GameWorld::renderPassRefraction() 513 {} 514 { 515 516 // clear buffer 517 glClear( GL_COLOR_BUFFER_BIT|GL_DEPTH_BUFFER_BIT); 518 glLoadIdentity(); 519 520 const std::list<BaseObject*>* reflectedWaters; 521 MappedWater* mw; 522 523 if( (reflectedWaters = ClassList::getList(CL_MAPPED_WATER)) != NULL) 524 { 525 std::list<BaseObject*>::const_iterator it; 526 for (it = reflectedWaters->begin(); it != reflectedWaters->end(); it++) 527 { 528 mw = dynamic_cast<MappedWater*>(*it); 529 530 // prepare for reflection rendering 531 mw->activateRefraction(); 532 533 //camera and light 534 this->dataTank->localCamera->apply (); 535 this->dataTank->localCamera->project (); 536 LightManager::getInstance()->draw(); 537 // draw everything to be included in the reflection 538 this->drawEntityList(State::getObjectManager()->getReflectionList()); 539 // for (unsigned int i = 0; i < this->dataTank->drawLists.size(); ++i) 540 // this->drawEntityList(State::getObjectManager()->getObjectList(this->dataTank->drawLists[i])); 541 542 // clean up from reflection rendering 543 mw->deactivateRefraction(); 544 } 545 } 546 } 514 547 515 548
Note: See TracChangeset
for help on using the changeset viewer.