Subversion Repository Public Repository

Divide-Framework

This repository has no backups
This repository's network speed is throttled to 100KB/sec

Diff Revisions 330 vs 331 for /trunk/Source Code/Rendering/Lighting/ShadowMapping/CubeShadowMap.cpp

Diff revisions: vs.
  @@ -9,10 +9,14 @@
9 9
10 10 namespace Divide {
11 11
12 - CubeShadowMap::CubeShadowMap(Light* light, Camera* shadowCamera) : ShadowMap(light, shadowCamera, SHADOW_TYPE_CubeMap)
12 + CubeShadowMap::CubeShadowMap(Light* light,
13 + Camera* shadowCamera) : ShadowMap(light,
14 + shadowCamera,
15 + SHADOW_TYPE_CubeMap)
13 16 {
14 17 PRINT_FN(Locale::get("LIGHT_CREATE_SHADOW_FB"), light->getGUID(), "Single Shadow Map");
15 - TextureDescriptor depthMapDescriptor(TEXTURE_CUBE_MAP, DEPTH_COMPONENT, UNSIGNED_INT); ///Default filters, LINEAR is OK for this
18 + // Default filters, LINEAR is OK for this
19 + TextureDescriptor depthMapDescriptor(TEXTURE_CUBE_MAP, DEPTH_COMPONENT, UNSIGNED_INT);
16 20
17 21 SamplerDescriptor depthMapSampler;
18 22 depthMapSampler.setWrapMode(TEXTURE_CLAMP_TO_EDGE);
  @@ -30,14 +34,14 @@
30 34 {
31 35 }
32 36
33 - void CubeShadowMap::init(ShadowMapInfo* const smi){
37 + void CubeShadowMap::init(ShadowMapInfo* const smi) {
34 38 resolution(smi->resolution(), _light->shadowMapResolutionFactor());
35 39 _init = true;
36 40 }
37 41
38 42 void CubeShadowMap::resolution(U16 resolution, U8 resolutionFactor){
39 43 U16 resolutionTemp = resolution * resolutionFactor;
40 - if (resolutionTemp != _resolution){
44 + if (resolutionTemp != _resolution) {
41 45 _resolution = resolutionTemp;
42 46 //Initialize the FB's with a variable resolution
43 47 PRINT_FN(Locale::get("LIGHT_INIT_SHADOW_FB"), _light->getGUID());
  @@ -46,7 +50,8 @@
46 50 ShadowMap::resolution(resolution, resolutionFactor);
47 51 }
48 52
49 - void CubeShadowMap::render(SceneRenderState& renderState, const DELEGATE_CBK<>& sceneRenderFunction){
53 + void CubeShadowMap::render(SceneRenderState& renderState,
54 + const DELEGATE_CBK<>& sceneRenderFunction) {
50 55 // Only if we have a valid callback;
51 56 if(!sceneRenderFunction) {
52 57 ERROR_FN(Locale::get("ERROR_LIGHT_INVALID_SHADOW_CALLBACK"), _light->getGUID());