Line | |
---|
1 | #include "OgreSBBRenderTechnique.h"
|
---|
2 | #include "OgreTechniqueGroup.h"
|
---|
3 | #include "OgreIlluminationManager.h"
|
---|
4 |
|
---|
5 |
|
---|
6 | OgreSBBRenderTechnique::OgreSBBRenderTechnique( unsigned char depthTexID,
|
---|
7 | Pass* pass,
|
---|
8 | OgreRenderable* parentRenderable,
|
---|
9 | OgreTechniqueGroup* parentTechniqueGroup)
|
---|
10 | :RenderTechnique( parentRenderable, parentTechniqueGroup),
|
---|
11 | OgreRenderTechnique(pass, parentRenderable, parentTechniqueGroup),
|
---|
12 | SBBRenderTechnique(parentRenderable, parentTechniqueGroup)
|
---|
13 | {
|
---|
14 | this->depthTexID = depthTexID;
|
---|
15 | OgreIlluminationManager::getSingleton().createGlobalRun(ILLUMRUN_SCENE_CAMERA_DEPTH);
|
---|
16 |
|
---|
17 |
|
---|
18 | OgreSceneCameraDepthRenderingRun* run = (OgreSceneCameraDepthRenderingRun*)
|
---|
19 | OgreIlluminationManager::getSingleton().getGlobalRun(ILLUMRUN_SCENE_CAMERA_DEPTH)->asOgreRenderingRun();
|
---|
20 |
|
---|
21 | pass->getTextureUnitState(depthTexID)->setTextureName(run->getDepthTextureName());
|
---|
22 |
|
---|
23 | }
|
---|
24 |
|
---|
25 | OgreSBBRenderTechnique::~OgreSBBRenderTechnique()
|
---|
26 | {
|
---|
27 |
|
---|
28 | }
|
---|
29 |
|
---|
30 | void OgreSBBRenderTechnique::update(unsigned long frameNum)
|
---|
31 | {
|
---|
32 | OgreIlluminationManager::getSingleton().updateGlobalRun(ILLUMRUN_SCENE_CAMERA_DEPTH, frameNum);
|
---|
33 | }
|
---|
34 |
|
---|
Note: See
TracBrowser
for help on using the repository browser.