source: obsolete/trunk/BUTE/Ogre/PreComputingRuns/VRMRenderDepthBufferMapPass.cpp @ 126

Revision 126, 1.5 KB checked in by barsi, 19 years ago (diff)

Added a folder remotely

Line 
1//      author: Barnabas Aszodi (BME-IIT)
2
3#include "Ogre.h"
4#include "OgreEffectWrapper.h"
5#include "ManagedOgreRenderTexturePass.h"
6#include "VRMRenderDepthBufferMapPass.h"
7
8
9VRMRenderDepthBufferMapPass::VRMRenderDepthBufferMapPass(
10                        Root* mRoot,const String& renderTextureName,unsigned int width,unsigned int height,
11                        TextureType texType, PixelFormat internalFormat,
12                        const NameValuePairList *miscParams,
13                        bool fullScreenQuadRenderer):ManagedOgreRenderTexturePass(mRoot,renderTextureName,width,height,texType,internalFormat,miscParams,fullScreenQuadRenderer)
14{
15        effectWrapper->createMaterial("RenderRoomColorDistance");
16}
17
18void VRMRenderDepthBufferMapPass::onRenderStart(NameValuePairList* namedParams){
19        effectWrapper->SetTechniqueToUse(0);
20        effectWrapper->BeginPass();
21        effectWrapper->SetVertexProgramParameters();
22        effectWrapper->SetMatrix("g_mLightViewTexBias",g_mLightViewTexBias);
23        effectWrapper->SetMatrix("g_mWorldViewProj",g_mWorldViewProj);
24}
25
26
27void VRMRenderDepthBufferMapPass::onRenderEnd(NameValuePairList* namedParams)
28{
29        effectWrapper->EndPass();
30}
31
32Matrix4 VRMRenderDepthBufferMapPass::getLightViewTexBias()
33{
34        return g_mLightViewTexBias;
35}
36
37void VRMRenderDepthBufferMapPass::setLightViewTexBias( Matrix4 matrix4 )
38{
39        g_mLightViewTexBias = matrix4;
40}
41
42Matrix4 VRMRenderDepthBufferMapPass::getWorldViewProj()
43{
44        return g_mWorldViewProj;
45}
46
47void VRMRenderDepthBufferMapPass::setWorldViewProj( Matrix4 matrix4 )
48{
49        g_mWorldViewProj = matrix4;
50}
Note: See TracBrowser for help on using the repository browser.