Example #1
0
void ReflectionTextureListener::postRenderTargetUpdate(const RenderTargetEvent& evt)
{
    // Show plane and objects below the water
	

    mWater->setVisible(true);
	std::vector<Ogre::MovableObject*>::iterator i, iend;
	iend = belowWaterEnts.end();
    for (i = belowWaterEnts.begin(); i != iend; ++i)
    {
        (*i)->setVisible(true);
    }
	belowWaterEnts.clear();

	/*Ogre::SceneManager::MovableObjectIterator it = Level::getSingleton()->getSceneManager()->getMovableObjectIterator("Entity");
	while(it.hasMoreElements()){
		Ogre::MovableObject *m = it.getNext();	
		if (m->getParentSceneNode()->_getDerivedPosition().y < mWater->getSceneNode()->_getDerivedPosition().y){
			m->setVisible(true);
		}
	}*/
	

	Ogre::Camera* cam = Level::getSingleton()->getCurrentSegment()->getActiveCamera()->getCamera();
	cam->disableReflection();
}
Example #2
0
 void postRenderTargetUpdate(const RenderTargetEvent& evt)
 {
   // Show plane and objects below the water
   pPlaneEnt->setVisible(true);
   std::vector<Entity*>::iterator i, iend;
   iend = belowWaterEnts.end();
   for (i = belowWaterEnts.begin(); i != iend; ++i) {
     (*i)->setVisible(true);
   }
   theCam->disableReflection();
 }