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/PostFX/PostFX.cpp

Diff revisions: vs.
  @@ -39,26 +39,21 @@
39 39 if (_postProcessingShader) {
40 40 RemoveResource(_postProcessingShader);
41 41
42 - if (_underwaterTexture) {
43 - RemoveResource(_underwaterTexture);
44 - }
45 -
46 42 if (_gfx->anaglyphEnabled()) {
47 43 RemoveResource(_anaglyphShader);
48 44 }
49 45
50 - if (_enableBloom) {
51 - MemoryManager::SAFE_DELETE( _bloomFB );
52 - }
53 -
54 - if (_enableSSAO) {
55 - MemoryManager::SAFE_DELETE( _SSAO_FB );
46 + if (_underwaterTexture) {
47 + RemoveResource(_underwaterTexture);
56 48 }
57 49
58 50 if (_enableNoise) {
59 51 RemoveResource(_noise);
60 52 RemoveResource(_screenBorder);
61 53 }
54 +
55 + MemoryManager::DELETE(_bloomFB);
56 + MemoryManager::DELETE(_SSAO_FB);
62 57 }
63 58
64 59 PreRenderStageBuilder::getInstance().destroyInstance();
  @@ -146,7 +141,8 @@
146 141
147 142 if (_enableSSAO && !_SSAO_FB) {
148 143 _SSAO_FB = _gfx->newFB();
149 - PreRenderOperator* ssaoOP = stageBuilder.addPreRenderOperator<SSAOPreRenderOperator>(_enableSSAO, _SSAO_FB, _resolutionCache);
144 + PreRenderOperator* ssaoOP = nullptr;
145 + ssaoOP = stageBuilder.addPreRenderOperator<SSAOPreRenderOperator>(_enableSSAO, _SSAO_FB, _resolutionCache);
150 146 ssaoOP->addInputFB(screenBuffer);
151 147 ssaoOP->addInputFB(depthBuffer);
152 148 }
  @@ -204,8 +200,9 @@
204 200
205 201 #ifdef _DEBUG
206 202 _gfx->getRenderTarget(_depthPreview ? GFXDevice::RENDER_TARGET_DEPTH :
207 - GFXDevice::RENDER_TARGET_SCREEN)->Bind(TEX_BIND_POINT_SCREEN, _depthPreview ? TextureDescriptor::Depth :
208 - TextureDescriptor::Color0);
203 + GFXDevice::RENDER_TARGET_SCREEN)->Bind(TEX_BIND_POINT_SCREEN,
204 + _depthPreview ? TextureDescriptor::Depth :
205 + TextureDescriptor::Color0);
209 206 #else
210 207 _gfx->getRenderTarget(GFXDevice::RENDER_TARGET_SCREEN)->Bind(TEX_BIND_POINT_SCREEN);
211 208 #endif