source: GTP/branches/IllumWPdeliver2008dec/IlluminationWP/precompiled/include/OgreIllumModule/RenderTechniques/OgreFireRenderTechnique.h @ 3255

Revision 3255, 2.7 KB checked in by szirmay, 15 years ago (diff)
Line 
1#pragma once
2
3//disable inheritance warning caused by multiple inheritance
4#if _WIN32
5#if _MSC_VER
6#pragma warning(disable: 4250)
7#endif
8#endif
9
10#include "OgreRenderTechnique.h"
11#include "Ogre.h"
12
13using namespace Ogre;
14
15class __declspec( dllexport ) FireRenderTarget :  public GlobalUseRenderTarget
16{
17       
18public:
19
20        static int targetsize;
21
22        FireRenderTarget();     
23        ~FireRenderTarget();   
24};
25
26
27
28/**
29        @brief A special SBBRenderTechnique used in an OGRE environment.
30
31        Instead of rendering to the frame buffer this Technique renders into two render targets at the same time.
32        The firs render target will be used as it were an ordinary backbuffer.
33        The second rendertarget will be used to simulate heat shimmering (offset values will be written to it).
34        The shimmering effect will be achieved with post processing: combining the backbuffer with the first render target using the second render target as uv offset.
35        Just like the spherical billboard techniqeue, this thechnique requires a depth image taken from main camera's viewpoint.       
36*/
37class __declspec( dllexport ) OgreFireRenderTechnique : public OgreRenderTechnique,
38                                                                        public RenderTargetListener,
39                                                                        public FrameListener,
40                                                                        public UpdateListener
41{
42public:
43        /**
44                @brief Constructor.
45
46                @param depthTexID                               the id of the texture unit state the resulting
47                                                                                        scene depth map should be bound to
48                @param pass                                             the pass to operate on                 
49                @param parentRenderable                 the object to operate on
50                @param parentTechniqueGroup             the TechniqueGroup this RenderedTechnique is attached to
51        */
52        OgreFireRenderTechnique(        unsigned char depthTexID,
53                                                        Pass* pass,
54                                                        OgreRenderable* parentRenderable,
55                                                        OgreTechniqueGroup* parentTechniqueGroup
56                                                        );
57        virtual ~OgreFireRenderTechnique();
58       
59        //inherited
60        virtual void update(unsigned long frameNum);
61        //inherited
62        void  preRenderTargetUpdate (const RenderTargetEvent &evt);
63        //inherited
64        void  postRenderTargetUpdate (const RenderTargetEvent &evt);
65        //inherited
66        bool  frameEnded (const FrameEvent &evt);
67        //inherited
68        void preAllUpdates();
69       
70protected:     
71        /**
72                &brief the id of the texture unit state the resulting scene depth map should be bound to
73        */
74        unsigned char depthTexID;
75        bool lastVisibility;
76       
77};
78
79/**
80        @brief RenderTechniqueFactory to create OgreFireRenderTechnique instances.
81*/
82class __declspec( dllexport ) OgreFireRenderTechniqueFactory : public RenderTechniqueFactory
83{
84public:
85       
86        OgreFireRenderTechniqueFactory();
87
88        OgreRenderTechnique* createInstance(IllumTechniqueParams* params,
89                                                                                Pass* pass,
90                                                                                OgreRenderable* parentRenderable,
91                                                                                OgreTechniqueGroup* parentTechniqueGroup);
92
93
94        unsigned char depthTexID;
95
96};
97
98
Note: See TracBrowser for help on using the repository browser.