[126] | 1 | // author: Barnabas Aszodi (BME-IIT)
|
---|
| 2 |
|
---|
| 3 | #include "Ogre.h"
|
---|
| 4 | #include "OgreEffectWrapper.h"
|
---|
| 5 | #include "ManagedOgreRenderTexturePass.h"
|
---|
| 6 | #include "CAURenderUVCubeMapPass.h"
|
---|
| 7 |
|
---|
| 8 |
|
---|
| 9 | CAURenderUVCubeMapPass::CAURenderUVCubeMapPass(
|
---|
| 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("RenderRoomUVMap");
|
---|
| 16 | }
|
---|
| 17 |
|
---|
| 18 | void CAURenderUVCubeMapPass::onRenderStart(NameValuePairList* namedParams){
|
---|
| 19 | effectWrapper->SetTechniqueToUse(0);
|
---|
| 20 | effectWrapper->BeginPass();
|
---|
| 21 | effectWrapper->SetVertexProgramParameters();
|
---|
| 22 | effectWrapper->SetMatrix("g_mWorldViewProj",g_mWorldViewProj);
|
---|
| 23 | }
|
---|
| 24 |
|
---|
| 25 |
|
---|
| 26 | void CAURenderUVCubeMapPass::onRenderEnd(NameValuePairList* namedParams)
|
---|
| 27 | {
|
---|
| 28 | effectWrapper->EndPass();
|
---|
| 29 | }
|
---|
| 30 |
|
---|
| 31 | Matrix4 CAURenderUVCubeMapPass::getWorldViewProj()
|
---|
| 32 | {
|
---|
| 33 | return g_mWorldViewProj;
|
---|
| 34 | }
|
---|
| 35 |
|
---|
| 36 | void CAURenderUVCubeMapPass::setWorldViewProj( Matrix4 matrix4 )
|
---|
| 37 | {
|
---|
| 38 | g_mWorldViewProj = matrix4;
|
---|
| 39 | } |
---|