source: obsolete/trunk/BUTE/Ogre/PreComputingRuns/CAURenderUmbraPass.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 "CAURenderUmbraPass.h"
7
8
9CAURenderUmbraPass::CAURenderUmbraPass(
10                        Root* mRoot,
11                        const String& renderTextureName,
12                        unsigned int width,
13                        unsigned int height,
14                        TextureType texType,
15                        PixelFormat internalFormat,
16                        const NameValuePairList *miscParams,
17                        bool fullScreenQuadRenderer):ManagedOgreRenderTexturePass(mRoot,renderTextureName,width,height,texType,internalFormat,miscParams,fullScreenQuadRenderer)
18{
19        effectWrapper->createMaterial("RenderUmbra");
20}
21
22void CAURenderUmbraPass::onRenderStart(NameValuePairList* namedParams){
23        effectWrapper->SetTechniqueToUse(0);
24        effectWrapper->BeginPass();
25        effectWrapper->SetVertexProgramParameters();
26        effectWrapper->SetVector3("g_vLightPos3f",g_vLightPos3f);
27        effectWrapper->SetFragmentProgramParameters();
28        effectWrapper->SetVector3("g_vLightPos3f",g_vLightPos3f);
29        effectWrapper->SetVector3("g_vEntityPos3f",g_vEntityPos3f);
30}
31
32
33void CAURenderUmbraPass::onRenderEnd(NameValuePairList* namedParams)
34{
35        effectWrapper->EndPass();
36}
37
38Vector3 CAURenderUmbraPass::getLightPos3f()
39{
40        return g_vLightPos3f;
41}
42
43void CAURenderUmbraPass::setLightPos3f( Vector3 vector3 )
44{
45        g_vLightPos3f = vector3;
46}
47
48Vector3 CAURenderUmbraPass::getEntityPos3f()
49{
50        return g_vEntityPos3f;
51}
52
53void CAURenderUmbraPass::setEntityPos3f( Vector3 vector3 )
54{
55        g_vEntityPos3f = vector3;
56}
Note: See TracBrowser for help on using the repository browser.