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