Subversion Repository Public Repository

Divide-Framework

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

Diff Revisions 267 vs 268 for /trunk/Source Code/Rendering/Lighting/ShadowMapping/ShadowMap.cpp

Diff revisions: vs.
  @@ -10,7 +10,6 @@
10 10 #include "Hardware/Video/Buffers/FrameBuffer/Headers/FrameBuffer.h"
11 11
12 12 ShadowMap::ShadowMap(Light* light, Camera* shadowCamera, ShadowType type) : _init(false),
13 - _isBound(false),
14 13 _light(light),
15 14 _shadowCamera(shadowCamera),
16 15 _shadowMapType(type),
  @@ -73,17 +72,14 @@
73 72 }
74 73
75 74 bool ShadowMap::Bind(U8 offset){
76 - if (_isBound || !_depthMap)
75 + if (!_depthMap)
77 76 return false;
78 77
79 - _isBound = true;
80 -
81 - if (getShadowMapType() == SHADOW_TYPE_CSM){
82 - _depthMap->Bind(offset, TextureDescriptor::Color0 );
83 - } else {
84 - _depthMap->Bind(offset, TextureDescriptor::Depth);
85 - }
78 + return BindInternal(offset);
79 + }
86 80
81 + bool ShadowMap::BindInternal(U8 offset){
82 + _depthMap->Bind(offset, TextureDescriptor::Depth);
87 83 return true;
88 84 }
89 85