Revision: 8946
http://playerstage.svn.sourceforge.net/playerstage/?rev=8946&view=rev
Author: natepak
Date: 2010-10-14 17:26:14 +0000 (Thu, 14 Oct 2010)
Log Message:
-----------
Fixed a transparency issue
Modified Paths:
--------------
code/gazebo/branches/wg/server/physics/Geom.cc
code/gazebo/branches/wg/server/rendering/OgreVisual.cc
Modified: code/gazebo/branches/wg/server/physics/Geom.cc
===================================================================
--- code/gazebo/branches/wg/server/physics/Geom.cc 2010-10-14 01:42:52 UTC
(rev 8945)
+++ code/gazebo/branches/wg/server/physics/Geom.cc 2010-10-14 17:26:14 UTC
(rev 8946)
@@ -196,11 +196,6 @@
childNode = childNode->GetNext("visual");
}
-
- if (this->GetShapeType() != Shape::PLANE && this->GetShapeType() !=
Shape::HEIGHTMAP)
- {
- this->ShowPhysics(false);
- }
}
////////////////////////////////////////////////////////////////////////////////
Modified: code/gazebo/branches/wg/server/rendering/OgreVisual.cc
===================================================================
--- code/gazebo/branches/wg/server/rendering/OgreVisual.cc 2010-10-14
01:42:52 UTC (rev 8945)
+++ code/gazebo/branches/wg/server/rendering/OgreVisual.cc 2010-10-14
17:26:14 UTC (rev 8946)
@@ -631,30 +631,15 @@
for (passCount=0; passCount < technique->getNumPasses(); passCount++)
{
pass = technique->getPass(passCount);
- sc = pass->getDiffuse();
+ pass->setSceneBlending(Ogre::SBT_TRANSPARENT_ALPHA);
- if (transparency > 0.0)
+ if (this->transparency > 0.0)
pass->setDepthWriteEnabled(false);
else
pass->setDepthWriteEnabled(true);
- switch (this->sceneBlendType)
- {
- case Ogre::SBT_ADD:
- dc = sc;
- dc.r -= sc.r * transparency;
- dc.g -= sc.g * transparency;
- dc.b -= sc.b * transparency;
- pass->setAmbient(Ogre::ColourValue::Black);
- break;
-
- case Ogre::SBT_TRANSPARENT_ALPHA:
- default:
- dc = sc;
- dc.a = (1.0f - transparency);
- pass->setAmbient(pass->getAmbient());
- break;
- }
+ dc = pass->getDiffuse();
+ dc.a = (1.0f - this->transparency);
pass->setDiffuse(dc);
}
}
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Beautiful is writing same markup. Internet Explorer 9 supports
standards for HTML5, CSS3, SVG 1.1, ECMAScript5, and DOM L2 & L3.
Spend less time writing and rewriting code and more time creating great
experiences on the web. Be a part of the beta today.
http://p.sf.net/sfu/beautyoftheweb
_______________________________________________
Playerstage-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/playerstage-commit