[MOD] can we add getShadowCasterMaterialName()?

Discussion area about developing or extending OGRE, adding plugins for it or building applications on it. No newbie questions please, use the Help forum for that.
User avatar
0xC0DEFACE
OGRE Expert User
OGRE Expert User
Posts: 84
Joined: Thu May 21, 2009 4:55 am
x 7

[MOD] can we add getShadowCasterMaterialName()?

Post by 0xC0DEFACE »

OgreTechnique stores the shadow caster material name but doesn't have an accessor function to let you see what it is.

Here is a patch for an accessor function:

Code: Select all

diff -r dac6bfcd3327 OgreMain/include/OgreTechnique.h
--- a/OgreMain/include/OgreTechnique.h	Sun Sep 16 20:47:24 2012 -0500
+++ b/OgreMain/include/OgreTechnique.h	Thu Sep 20 13:54:41 2012 +1000
@@ -252,6 +252,9 @@
 		/** return this material specific  shadow casting specific material
 		*/
 		Ogre::MaterialPtr getShadowCasterMaterial() const;
+		/** return the name of the material specific shadow casting material
+		*/
+		const Ogre::String& getShadowCasterMaterialName() const { return mShadowCasterMaterialName; }
 		/** set this material specific  shadow casting specific material
 		*/
 		void setShadowCasterMaterial(Ogre::MaterialPtr val);

Super simple change :)

Thanks!!
User avatar
Wolfmanfx
OGRE Team Member
OGRE Team Member
Posts: 1525
Joined: Fri Feb 03, 2006 10:37 pm
Location: Austria - Leoben
x 100

Re: [MOD] can we add getShadowCasterMaterialName()?

Post by Wolfmanfx »

Man i am thinking of deleting your topics :) this subforum is not mantis so use our bugtracker for bug entries and feature requests.
Otherwise we will drunk in noise soon.
User avatar
0xC0DEFACE
OGRE Expert User
OGRE Expert User
Posts: 84
Joined: Thu May 21, 2009 4:55 am
x 7

Re: [MOD] can we add getShadowCasterMaterialName()?

Post by 0xC0DEFACE »

Ah. Fair enough! however the OgreSimpleSpline and OgreRotationalSpline one should stay I suppose, as I'm not 100% sure what is going on there and was hoping someone in the know, would be able to elaborate and confirm if this is a bug.

Would you like me to delete the other two and post them in mantis?
User avatar
Wolfmanfx
OGRE Team Member
OGRE Team Member
Posts: 1525
Joined: Fri Feb 03, 2006 10:37 pm
Location: Austria - Leoben
x 100

Re: [MOD] can we add getShadowCasterMaterialName()?

Post by Wolfmanfx »

No keep it but do it the otherway around in the future.