diff options
Diffstat (limited to 'indra/newview')
-rw-r--r-- | indra/newview/llreflectionmapmanager.cpp | 23 | ||||
-rw-r--r-- | indra/newview/llreflectionmapmanager.h | 3 | ||||
-rw-r--r-- | indra/newview/pipeline.cpp | 2 |
3 files changed, 28 insertions, 0 deletions
diff --git a/indra/newview/llreflectionmapmanager.cpp b/indra/newview/llreflectionmapmanager.cpp index 8282aa2507..e8ad813ed2 100644 --- a/indra/newview/llreflectionmapmanager.cpp +++ b/indra/newview/llreflectionmapmanager.cpp @@ -918,3 +918,26 @@ void LLReflectionMapManager::initReflectionMaps() mVertexBuffer = buff; } } + +void LLReflectionMapManager::cleanup() +{ + mVertexBuffer = nullptr; + mRenderTarget.release(); + + mMipChain.clear(); + + mTexture = nullptr; + mIrradianceMaps = nullptr; + + mProbes.clear(); + mKillList.clear(); + mCreateList.clear(); + + mReflectionMaps.clear(); + mUpdatingFace = 0; + + mDefaultProbe = nullptr; + + glDeleteBuffers(1, &mUBO); + mUBO = 0; +} diff --git a/indra/newview/llreflectionmapmanager.h b/indra/newview/llreflectionmapmanager.h index e0a2c00db3..4e2ff7c751 100644 --- a/indra/newview/llreflectionmapmanager.h +++ b/indra/newview/llreflectionmapmanager.h @@ -58,6 +58,9 @@ public: // allocate an environment map of the given resolution LLReflectionMapManager(); + // release any GL state + void cleanup(); + // maintain reflection probes void update(); diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index 0f348e4bc4..2d4db48ac5 100644 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -659,6 +659,8 @@ void LLPipeline::cleanup() mDeferredVB = NULL; mCubeVB = NULL; + + mReflectionMapManager.cleanup(); } //============================================================================ |