Subversion Repository Public Repository

Divide-Framework

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

Diff Revisions 167 vs 168 for /trunk/Source Code/Rendering/Lighting/ShadowMapping/ShadowMap.cpp

Diff revisions: vs.
  @@ -30,7 +30,7 @@
30 30 SAFE_DELETE(_shadowMap);
31 31 }
32 32
33 - ShadowMap* ShadowMapInfo::getOrCreateShadowMap(SceneRenderState* sceneRenderState){
33 + ShadowMap* ShadowMapInfo::getOrCreateShadowMap(const SceneRenderState& renderState){
34 34 if(_shadowMap) return _shadowMap;
35 35 if(!_light->castsShadows()) return NULL;
36 36 switch(_light->getLightType()){
  @@ -46,24 +46,29 @@
46 46 default:
47 47 break;
48 48 };
49 - _shadowMap->resolution(_resolution,sceneRenderState);
49 + _shadowMap->resolution(_resolution, renderState);
50 50 return _shadowMap;
51 51 }
52 52
53 53 bool ShadowMap::Bind(U8 offset){
54 - if(_isBound) return false;
54 + if(_isBound)
55 + return false;
56 +
55 57 _isBound = true;
56 - if(_depthMap){
58 +
59 + if(_depthMap)
57 60 _depthMap->Bind(offset);
58 - }
61 +
59 62 return true;
60 63 }
61 64
62 65 bool ShadowMap::Unbind(U8 offset){
63 - if(!_isBound) return false;
64 - if(_depthMap){
66 + if(!_isBound)
67 + return false;
68 +
69 + if(_depthMap)
65 70 _depthMap->Unbind(offset);
66 - }
71 +
67 72 _isBound = false;
68 73 return true;
69 74 }