BambooIsland: C:/Users/easterbunny/Desktop/Echtzeitgraphik-LU/trunk/src/SceneObject_RenderFromLight.cpp Source File

BambooIsland Abgabe 2

- Main Page
- Related Pages
- Classes
- Files

- File List

# C:/Users/easterbunny/Desktop/Echtzeitgraphik-LU/trunk/src/SceneObject_RenderFromLight.cpp

    00001 /*
    00002  * source file for SceneObject_RenderFromLight class
    00003  * written by: christian moellinger <ch.moellinger@gmail.com>
    00004  * 01/2011
    00005  */
    00006
    00007 #include <glm/gtc/matrix_projection.hpp>
    00008 #include <glm/gtc/matrix_transform.hpp>
    00009 #include <glm/gtx/transform.hpp>
    00010 #include <glm/gtx/transform2.hpp>
    00011 #include <glm/gtc/type_ptr.hpp>
    00012 #include <vector>
    00013
    00014 #include "common_gl.h"
    00015
    00016 #include "Camera.h"
    00017 #include "SceneObject_RenderFromLight.h"
    00018 #include "LightManager.h"
    00019
    00020 const double DEFAULT_FOV = 45.0;
    00021 const double DEFAULT_RATIO = 1.33;
    00022 const double DEFAULT_NEARPLANE = 1.0;
    00023 const double DEFAULT_FARPLANE = 100.0;
    00024
    00025 void SceneObject_RenderFromLight::itlBeforeRender()
    00026 {
    00027     glClearColor(1.0, 0.0, 0.0, 0.0);
    00028     glClear(GL_COLOR_BUFFER_BIT);
    00029     glClearColor(0.0, 0.0, 0.0, 0.0);
    00030
    00031     glCullFace(GL_FRONT);
    00032     Camera::instance()->setLightMatrixForShadowMapping();
    00033
    00034     m_tRenderState = LightAsCam;
    00035 }
    00036
    00037 void SceneObject_RenderFromLight::itlRender()
    00038 {
    00039     Camera::instance()->unsetLightMatrix();
    00040     glCullFace(GL_BACK);
    00041 }
    00042
    00043 SceneObject_RenderFromLight::SceneObject_RenderFromLight()
    00044 {
    00045
    00046 }
    00047
    00048 SceneObject_RenderFromLight::~SceneObject_RenderFromLight()
    00049 {
    00050
    00051 }
    00052
    00053

All Classes Functions Variables Enumerations Enumerator