Revision: 7140 http://playerstage.svn.sourceforge.net/playerstage/?rev=7140&view=rev Author: natepak Date: 2008-11-13 20:45:50 +0000 (Thu, 13 Nov 2008)
Log Message: ----------- Fixed the initial rendering of the GL Frame, and added some debug code to StereoCameraSensor Modified Paths: -------------- code/gazebo/trunk/server/gui/GLFrame.cc code/gazebo/trunk/server/sensors/camera/StereoCameraSensor.cc code/gazebo/trunk/worlds/models/bandit.model Modified: code/gazebo/trunk/server/gui/GLFrame.cc =================================================================== --- code/gazebo/trunk/server/gui/GLFrame.cc 2008-11-12 23:54:19 UTC (rev 7139) +++ code/gazebo/trunk/server/gui/GLFrame.cc 2008-11-13 20:45:50 UTC (rev 7140) @@ -129,6 +129,9 @@ this->glWindow->GetCamera()->SetSaveFramePathname(this->savePathname); CameraManager::Instance()->ConnectAddCameraSignal( boost::bind(&GLFrame::CameraAddedSlot, this, _1) ); + + this->show(); + this->redraw(); } //////////////////////////////////////////////////////////////////////////////// Modified: code/gazebo/trunk/server/sensors/camera/StereoCameraSensor.cc =================================================================== --- code/gazebo/trunk/server/sensors/camera/StereoCameraSensor.cc 2008-11-12 23:54:19 UTC (rev 7139) +++ code/gazebo/trunk/server/sensors/camera/StereoCameraSensor.cc 2008-11-13 20:45:50 UTC (rev 7140) @@ -186,6 +186,42 @@ this->depthBuffer[1] = new float[this->depthBufferSize]; this->rgbBuffer[0] = new unsigned char[this->rgbBufferSize]; this->rgbBuffer[1] = new unsigned char[this->rgbBufferSize]; + + Ogre::MaterialPtr debugMat = Ogre::MaterialManager::getSingleton().create( + "Ogre/DebugShadowMap0", + Ogre::ResourceGroupManager::DEFAULT_RESOURCE_GROUP_NAME); + + debugMat->getTechnique(0)->getPass(0)->setLightingEnabled(false); + Ogre::TexturePtr shadowTex = OgreAdaptor::Instance()->sceneMgr->getShadowTexture(0); + Ogre::TextureUnitState *t = debugMat->getTechnique(0)->getPass(0)->createTextureUnitState(shadowTex->getName()); + t->setTextureAddressingMode(Ogre::TextureUnitState::TAM_CLAMP); + + /*debugMat = Ogre::MaterialManager::getSingleton().create( + "Ogre/DebugShadowMap1", + Ogre::ResourceGroupManager::DEFAULT_RESOURCE_GROUP_NAME); + debugMat->getTechnique(0)->getPass(0)->setLightingEnabled(false); + shadowTex = OgreAdaptor::Instance()->sceneMgr->getShadowTexture(1); + t = debugMat->getTechnique(0)->getPass(0)->createTextureUnitState(shadowTex->getName()); + t->setTextureAddressingMode(Ogre::TextureUnitState::TAM_CLAMP); + + + Ogre::OverlayContainer* debugPanel = (Ogre::OverlayContainer*) + (Ogre::OverlayManager::getSingleton().createOverlayElement("Panel", "Ogre/DebugShadowPanel0")); + debugPanel->_setPosition(0.8, 0); + debugPanel->_setDimensions(0.2, 0.2); + debugPanel->setMaterialName("Ogre/DebugShadowMap0"); + Ogre::Overlay* debugOverlay = Ogre::OverlayManager::getSingleton().getByName("Core/DebugOverlay"); + if (!debugOverlay) + printf("NULL\n"); + debugOverlay->add2D(debugPanel); + + debugPanel = (Ogre::OverlayContainer*) + (Ogre::OverlayManager::getSingleton().createOverlayElement("Panel", "Ogre/DebugShadowPanel1")); + debugPanel->_setPosition(0.8, 0.2); + debugPanel->_setDimensions(0.2, 0.2); + debugPanel->setMaterialName("Ogre/DebugShadowMap1"); + debugOverlay->add2D(debugPanel); + */ } ////////////////////////////////////////////////////////////////////////////// @@ -281,10 +317,10 @@ sceneMgr->_suppressRenderStateChanges(false); // Render the image texture - for (i=0; i<2; i++) + /*for (i=0; i<2; i++) { this->renderTargets[i]->update(); - } + }*/ if (gridNode) gridNode->setVisible(true); Modified: code/gazebo/trunk/worlds/models/bandit.model =================================================================== --- code/gazebo/trunk/worlds/models/bandit.model 2008-11-12 23:54:19 UTC (rev 7139) +++ code/gazebo/trunk/worlds/models/bandit.model 2008-11-13 20:45:50 UTC (rev 7140) @@ -74,7 +74,7 @@ <hfov>60</hfov> <nearClip>0.1</nearClip> <farClip>100</farClip> - <saveFrames>false</saveFrames> + <saveFrames>true</saveFrames> <saveFramePath>frames</saveFramePath> <baseline>0.2</baseline> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ Playerstage-commit mailing list Playerstage-commit@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/playerstage-commit