#pragma once //disable inheritance warning caused by multiple inheritance #if _WIN32 #if _MSC_VER #pragma warning(disable: 4250) #endif #endif #include "OgreRenderTechnique.h" #include "SBBRenderTechnique.h" #include "Ogre.h" using namespace Ogre; /** @brief SBBRenderTechnique used in an OGRE environment. */ class OgreSBBRenderTechnique : public OgreRenderTechnique, public SBBRenderTechnique, public RenderTargetListener, public FrameListener, public UpdateListener { public: /** @brief Constructor. @param depthTexID the id of the texture unit state the resulting scene depth map should be bound to @param pass the pass to operate on @param parentRenderable the object to operate on @param parentTechniqueGroup the TechniqueGroup this RenderedTechnique is attached to */ OgreSBBRenderTechnique( unsigned char depthTexID, Pass* pass, OgreRenderable* parentRenderable, OgreTechniqueGroup* parentTechniqueGroup ); ~OgreSBBRenderTechnique(); //inherited virtual void update(unsigned long frameNum); void preRenderTargetUpdate (const RenderTargetEvent &evt); void postRenderTargetUpdate (const RenderTargetEvent &evt); bool frameEnded (const FrameEvent &evt); void preAllUpdates(); void postAllUpdates(); protected: /** &brief the id of the texture unit state the resulting scene depth map should be bound to */ unsigned char depthTexID; bool lastVisibility; }; class OgreSBBRenderTechniqueFactory : public RenderTechniqueFactory { public: OgreSBBRenderTechniqueFactory(); OgreRenderTechnique* createInstance(IllumTechniqueParams* params, Pass* pass, OgreRenderable* parentRenderable, OgreTechniqueGroup* parentTechniqueGroup); unsigned char depthTexID; };