/////////////////////////////////////////////////////////////////////////// // // Realistic rain real-time simulation program // // Pierre Rousseau // /////////////////////////////////////////////////////////////////////////// // // Texture cameras handling // /////////////////////////////////////////////////////////////////////////// #ifndef __RAIN_TEXTURE_FRAME_LISTENER__ #define __RAIN_TEXTURE_FRAME_LISTENER__ #include "CommonRain.h" #include "OgreRenderTargetListener.h" #include "ExampleApplication.h" /** TextureFrameListener class * enables us not to see the particle systems in the textures we capture to texture our particles */ class TextureFrameListener : public Ogre::RenderTargetListener { private : SceneManager* mSceneMgr; public: /** constructor used when rain is rendered with a particle system */ TextureFrameListener(SceneManager* SceneMgr); /** pre-render operations, hides the rain system, so it is not seen in the captured texture */ void preRenderTargetUpdate (const Ogre::RenderTargetEvent &evt); /** post-render operations, shows the hidden rain system */ void postRenderTargetUpdate (const Ogre::RenderTargetEvent &evt); }; #endif //__RAIN_TEXTURE_FRAME_LISTENER__