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

Revision 3255, 2.6 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
15struct PathMapClusters;
16/**
17        @brief A technique that defines that the rendering of the object will use the path map technique.
18
19        This rendering technique can add indirect lighting to the scene.
20*/
21class __declspec( dllexport ) OgrePathMapRenderTechnique : public OgreRenderTechnique
22{
23public:
24        /**
25                @brief Constructor.
26
27                @param passBlendingSRC                  source blend factor of the new pass
28                @param passBlendingDEST                 destination blend factor of the new pass
29                @param pass                                             the pass after which shadowing passes should be added
30                @param parentRenderable                 the object to operate on
31                @param parentTechniqueGroup             the TechniqueGroup this RenderedTechnique is attached to
32        */
33        OgrePathMapRenderTechnique(
34                                                        SceneBlendFactor passBlendingSRC,
35                                                        SceneBlendFactor passBlendingDEST,
36                                                        bool createNewPasses,
37                                                        int startTextureUnitID,
38                                                        Pass* pass,
39                                                        OgreRenderable* parentRenderable,
40                                                        OgreTechniqueGroup* parentTechniqueGroup
41                                                        );
42        /**
43                @brief Destructor.
44        */
45        virtual ~OgrePathMapRenderTechnique();
46       
47        //inherited
48        virtual void update(unsigned long frameNum);
49       
50protected:
51        /**
52                @brief the new pass created by this technique
53        */
54        Pass* pathMapPass;
55        /**
56                @brief the PathMapClusters structure that belongs to the subentity renderable
57        */
58        PathMapClusters* clusters;
59        /**
60                @brief the weight index lookup map created by this technique
61        */
62        Texture* weightIndexTexture;
63        /**
64                @brief create a weight index lookup map
65        */
66        void createWeightIndexTexture();
67        /**
68                @brief source blend factor of the new pass
69        */
70        SceneBlendFactor passBlendingSRC;
71        /**
72                @brief destination blend factor of the new pass
73        */
74        SceneBlendFactor passBlendingDEST;
75        bool createNewPasses;
76        int startTextureUnitID;
77};
78
79/**
80        @brief RenderTechniqueFactory to create OgrePathMapRenderTechnique instances.
81*/
82class __declspec( dllexport ) OgrePathMapRenderTechniqueFactory : public RenderTechniqueFactory
83{
84public:
85       
86        OgrePathMapRenderTechniqueFactory();
87
88        OgreRenderTechnique* createInstance(IllumTechniqueParams* params,
89                                                                                Pass* pass,
90                                                                                OgreRenderable* parentRenderable,
91                                                                                OgreTechniqueGroup* parentTechniqueGroup);
92
93        virtual bool needMaterialCopy(IllumTechniqueParams* params){return true;}
94
95        SceneBlendFactor passBlendingSRC;
96        SceneBlendFactor passBlendingDEST;
97        bool createNewPasses;
98        int startTextureUnitID;
99};
100
Note: See TracBrowser for help on using the repository browser.