[Orxonox-commit 6438] r11095 - code/trunk/src/libraries/core
landauf at orxonox.net
landauf at orxonox.net
Sun Jan 24 23:28:05 CET 2016
Author: landauf
Date: 2016-01-24 23:28:05 +0100 (Sun, 24 Jan 2016)
New Revision: 11095
Modified:
code/trunk/src/libraries/core/GlowMaterialListener.h
Log:
simplified transparency-check
Modified: code/trunk/src/libraries/core/GlowMaterialListener.h
===================================================================
--- code/trunk/src/libraries/core/GlowMaterialListener.h 2016-01-24 21:40:10 UTC (rev 11094)
+++ code/trunk/src/libraries/core/GlowMaterialListener.h 2016-01-24 22:28:05 UTC (rev 11095)
@@ -31,14 +31,8 @@
if (schemeName == "glow")
{
// try to figure out if the original material is transparent. if yes, use a black transparent material, otherwise a black opaque one.
- if (mat != nullptr && mat->getTechnique(0) != nullptr && mat->getTechnique(0)->getPass(0) != nullptr)
- {
- Ogre::Pass* pass = mat->getTechnique(0)->getPass(0);
- if (pass->getDepthWriteEnabled())
- return mBlackMat->getTechnique(0);
- else
- return mTransparentMat->getTechnique(0);
- }
+ if (mat->isTransparent())
+ return mTransparentMat->getTechnique(0);
else
return mBlackMat->getTechnique(0);
}
More information about the Orxonox-commit
mailing list