source: GTP/trunk/Lib/Illum/IllumModule/OgreIllumModule/include/RenderTechniques/OgreSBBRenderTechnique.h @ 2320

Revision 2320, 2.0 KB checked in by szirmay, 17 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 "SBBRenderTechnique.h"
12#include "Ogre.h"
13
14using namespace Ogre;
15
16/**
17        @brief SBBRenderTechnique used in an OGRE environment.
18*/
19class OgreSBBRenderTechnique : public OgreRenderTechnique,
20                                                                                public SBBRenderTechnique,
21                                                                                public RenderTargetListener,
22                                                                                public FrameListener,
23                                                                                public UpdateListener
24{
25public:
26        /**
27                @brief Constructor.
28
29                @param depthTexID                               the id of the texture unit state the resulting
30                                                                                        scene depth map should be bound to
31                @param pass                                             the pass to operate on                 
32                @param parentRenderable                 the object to operate on
33                @param parentTechniqueGroup             the TechniqueGroup this RenderedTechnique is attached to
34        */
35        OgreSBBRenderTechnique( unsigned char depthTexID,
36                                                        Pass* pass,
37                                                        OgreRenderable* parentRenderable,
38                                                        OgreTechniqueGroup* parentTechniqueGroup
39                                                        );
40        virtual ~OgreSBBRenderTechnique();
41       
42        //inherited
43        virtual void update(unsigned long frameNum);
44        //inherited
45        void  preRenderTargetUpdate (const RenderTargetEvent &evt);
46        //inherited
47        void  postRenderTargetUpdate (const RenderTargetEvent &evt);
48        //inherited
49        bool  frameEnded (const FrameEvent &evt);
50        //inherited
51        void preAllUpdates();
52        //inherited
53        void postAllUpdates();
54       
55protected:     
56        /**
57                &brief the id of the texture unit state the resulting scene depth map should be bound to
58        */
59        unsigned char depthTexID;
60
61        bool lastVisibility;
62       
63};
64
65/**
66        @brief RenderTechniqueFactory to create OgreSBBRenderTechnique instances.
67*/
68class OgreSBBRenderTechniqueFactory : public RenderTechniqueFactory
69{
70public:
71       
72        OgreSBBRenderTechniqueFactory();
73
74        OgreRenderTechnique* createInstance(IllumTechniqueParams* params,
75                                                                                Pass* pass,
76                                                                                OgreRenderable* parentRenderable,
77                                                                                OgreTechniqueGroup* parentTechniqueGroup);
78
79
80        unsigned char depthTexID;
81
82};
83
84
Note: See TracBrowser for help on using the repository browser.