#pragma once //disable inheritance warning caused by multiple inheritance #if _WIN32 #if _MSC_VER #pragma warning(disable: 4250) #endif #endif #include "OgreRenderTechnique.h" #include "Ogre.h" using namespace Ogre; struct PathMapClusters; /** @brief A technique that defines that the rendering of the object will use the path map technique. This rendering technique can add indirect lighting to the scene. */ class OgrePathMapRenderTechnique : public OgreRenderTechnique { public: /** @brief Constructor. @param passBlendingSRC source blend factor of the new pass @param passBlendingDEST destination blend factor of the new pass @param pass the pass after which shadowing passes should be added @param parentRenderable the object to operate on @param parentTechniqueGroup the TechniqueGroup this RenderedTechnique is attached to */ OgrePathMapRenderTechnique( SceneBlendFactor passBlendingSRC, SceneBlendFactor passBlendingDEST, bool createNewPasses, int startTextureUnitID, Pass* pass, OgreRenderable* parentRenderable, OgreTechniqueGroup* parentTechniqueGroup ); /** @brief Destructor. */ virtual ~OgrePathMapRenderTechnique(); //inherited virtual void update(unsigned long frameNum); protected: /** @brief the new pass created by this technique */ Pass* pathMapPass; /** @brief the PathMapClusters structure that belongs to the subentity renderable */ PathMapClusters* clusters; /** @brief the weight index lookup map created by this technique */ Texture* weightIndexTexture; /** @brief create a weight index lookup map */ void createWeightIndexTexture(); /** @brief source blend factor of the new pass */ SceneBlendFactor passBlendingSRC; /** @brief destination blend factor of the new pass */ SceneBlendFactor passBlendingDEST; bool createNewPasses; int startTextureUnitID; }; /** @brief RenderTechniqueFactory to create OgrePathMapRenderTechnique instances. */ class OgrePathMapRenderTechniqueFactory : public RenderTechniqueFactory { public: OgrePathMapRenderTechniqueFactory(); OgreRenderTechnique* createInstance(IllumTechniqueParams* params, Pass* pass, OgreRenderable* parentRenderable, OgreTechniqueGroup* parentTechniqueGroup); virtual bool needMaterialCopy(IllumTechniqueParams* params){return true;} SceneBlendFactor passBlendingSRC; SceneBlendFactor passBlendingDEST; bool createNewPasses; int startTextureUnitID; };