source: GTP/trunk/Lib/Illum/IllumModule/OgreIllumModule/include/RenderTechniques/OgrePathMapRenderTechnique.h @ 2397

Revision 2397, 2.6 KB checked in by szirmay, 17 years ago (diff)
RevLine 
[2185]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/**
[2240]17        @brief A technique that defines that the rendering of the object will use the path map technique.
[2185]18
[2240]19        This rendering technique can add indirect lighting to the scene.
[2185]20*/
21class OgrePathMapRenderTechnique : public OgreRenderTechnique
22{
23public:
24        /**
25                @brief Constructor.
26
[2299]27                @param passBlendingSRC                  source blend factor of the new pass
28                @param passBlendingDEST                 destination blend factor of the new pass
[2185]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        */
[2299]33        OgrePathMapRenderTechnique(
34                                                        SceneBlendFactor passBlendingSRC,
35                                                        SceneBlendFactor passBlendingDEST,
[2366]36                                                        bool createNewPasses,
37                                                        int startTextureUnitID,
[2299]38                                                        Pass* pass,
[2185]39                                                        OgreRenderable* parentRenderable,
40                                                        OgreTechniqueGroup* parentTechniqueGroup
41                                                        );
42        /**
43                @brief Destructor.
44        */
[2320]45        virtual ~OgrePathMapRenderTechnique();
[2185]46       
47        //inherited
48        virtual void update(unsigned long frameNum);
49       
[2240]50protected:
51        /**
52                @brief the new pass created by this technique
53        */
[2189]54        Pass* pathMapPass;
[2240]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        */
[2200]62        Texture* weightIndexTexture;
[2240]63        /**
64                @brief create a weight index lookup map
65        */
[2200]66        void createWeightIndexTexture();
[2299]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;
[2366]75        bool createNewPasses;
76        int startTextureUnitID;
[2185]77};
78
[2240]79/**
80        @brief RenderTechniqueFactory to create OgrePathMapRenderTechnique instances.
81*/
[2185]82class OgrePathMapRenderTechniqueFactory : public RenderTechniqueFactory
83{
84public:
85       
86        OgrePathMapRenderTechniqueFactory();
87
88        OgreRenderTechnique* createInstance(IllumTechniqueParams* params,
89                                                                                Pass* pass,
90                                                                                OgreRenderable* parentRenderable,
91                                                                                OgreTechniqueGroup* parentTechniqueGroup);
[2299]92
[2397]93        virtual bool needMaterialCopy(IllumTechniqueParams* params){return true;}
94
[2299]95        SceneBlendFactor passBlendingSRC;
96        SceneBlendFactor passBlendingDEST;
[2366]97        bool createNewPasses;
98        int startTextureUnitID;
[2185]99};
100
Note: See TracBrowser for help on using the repository browser.