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 "ConvolvedCubeMapRenderTechnique.h"
|
---|
11 | #include "OgreCubeMapRenderTechnique.h"
|
---|
12 | #include "Ogre.h"
|
---|
13 |
|
---|
14 | using namespace Ogre;
|
---|
15 |
|
---|
16 | /**
|
---|
17 | @brief ConvolvedCubeMapRenderTechnique used in an Ogre environment.
|
---|
18 | */
|
---|
19 | class OgreConvolvedCubeMapRenderTechnique : public ConvolvedCubeMapRenderTechnique,
|
---|
20 | public OgreCubeMapRenderTechnique
|
---|
21 | {
|
---|
22 | public:
|
---|
23 |
|
---|
24 | /**
|
---|
25 | @brief Constructor.
|
---|
26 |
|
---|
27 | @param startFrame adds an offset to the current frame number to help evenly distribute updates between frames
|
---|
28 | @param cubeMapUpdateInterval update frequency
|
---|
29 | @param cubeMapResolution color cubemap resolution
|
---|
30 | @param reducedCubeMapResolution reduced sized color cubemap resolution
|
---|
31 | @param reducedTexID the id of the texture unit state the resulting cubemap should be bound to
|
---|
32 | @param useDistCalc flag to skip cube face update if object is far away
|
---|
33 | @param useFaceAngleCalc flag to skip cube face update if face is neglible
|
---|
34 | @param distTolerance distance tolerance used in face skip
|
---|
35 | @param angleTolerance angle tolerance used in face skip
|
---|
36 | @param updateAllFace defines if all cubemap faces should be updated in a frame or only one face per frame
|
---|
37 | @param pass the pass to operate on
|
---|
38 | @param parentRenderable the object to operate on
|
---|
39 | @param parentTechniqueGroup the TechniqueGroup this RenderedTechnique is attached to
|
---|
40 | */
|
---|
41 | OgreConvolvedCubeMapRenderTechnique( unsigned long startFrame,
|
---|
42 | unsigned long cubeMapUpdateInterval,
|
---|
43 | unsigned int cubeMapResolution,
|
---|
44 | unsigned int reducedCubeMapResolution,
|
---|
45 | unsigned char texID,
|
---|
46 | bool useDistCalc,
|
---|
47 | bool useFaceAngleCalc,
|
---|
48 | float distTolerance,
|
---|
49 | float angleTolerance,
|
---|
50 | bool updateAllFace,
|
---|
51 | bool renderSelf,
|
---|
52 | bool renderEnvironment,
|
---|
53 | String selfMaterial,
|
---|
54 | String environmentMaterial,
|
---|
55 | Pass* pass,
|
---|
56 | OgreRenderable* parentRenderable,
|
---|
57 | OgreTechniqueGroup* parentTechniqueGroup
|
---|
58 | );
|
---|
59 | /**
|
---|
60 | @brief Destructor.
|
---|
61 | */
|
---|
62 | ~OgreConvolvedCubeMapRenderTechnique();
|
---|
63 |
|
---|
64 | //inherited
|
---|
65 | void update(unsigned long frameNum);
|
---|
66 |
|
---|
67 | protected:
|
---|
68 |
|
---|
69 | //inherited
|
---|
70 | void reducedCubeMapRunChanged(RenderingRun* run);
|
---|
71 | //inherited
|
---|
72 | void colorCubeMapRunChanged(RenderingRun* run);
|
---|
73 | //inherited
|
---|
74 | RenderingRun* createReducedCubeMapRun();
|
---|
75 |
|
---|
76 | };
|
---|
77 |
|
---|
78 |
|
---|
79 |
|
---|
80 | class OgreConvoledCubeMapRenderTechniqueFactory : public OgreCubeMapRenderTechniqueFactory
|
---|
81 | {
|
---|
82 | public:
|
---|
83 |
|
---|
84 | OgreConvoledCubeMapRenderTechniqueFactory();
|
---|
85 |
|
---|
86 | OgreRenderTechnique* createInstance(IllumTechniqueParams* params,
|
---|
87 | Pass* pass,
|
---|
88 | OgreRenderable* parentRenderable,
|
---|
89 | OgreTechniqueGroup* parentTechniqueGroup);
|
---|
90 |
|
---|
91 |
|
---|
92 | unsigned int reducedCubeMapResolution;
|
---|
93 | };
|
---|