From ed2b768da29f8dc4f96b463fe4d4087deab75a37 Mon Sep 17 00:00:00 2001 From: Dave Parks Date: Fri, 2 Dec 2022 09:56:42 -0600 Subject: SL-18745 Fix for assert on teleport. --- indra/newview/llreflectionmapmanager.cpp | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 'indra/newview/llreflectionmapmanager.cpp') diff --git a/indra/newview/llreflectionmapmanager.cpp b/indra/newview/llreflectionmapmanager.cpp index e8ad813ed2..088b83a8e9 100644 --- a/indra/newview/llreflectionmapmanager.cpp +++ b/indra/newview/llreflectionmapmanager.cpp @@ -40,6 +40,11 @@ extern BOOL gCubeSnapshot; extern BOOL gTeleportDisplay; LLReflectionMapManager::LLReflectionMapManager() +{ + initCubeFree(); +} + +void LLReflectionMapManager::initCubeFree() { for (int i = 1; i < LL_MAX_REFLECTION_PROBE_COUNT; ++i) { @@ -50,12 +55,6 @@ LLReflectionMapManager::LLReflectionMapManager() mCubeFree[0] = false; } -struct CompareReflectionMapDistance -{ - -}; - - struct CompareProbeDistance { bool operator()(const LLPointer& lhs, const LLPointer& rhs) @@ -79,7 +78,6 @@ void LLReflectionMapManager::update() return; } - // =============== TODO -- move to an init function ================= initReflectionMaps(); if (!mRenderTarget.isComplete()) @@ -937,7 +935,11 @@ void LLReflectionMapManager::cleanup() mUpdatingFace = 0; mDefaultProbe = nullptr; + mUpdatingProbe = nullptr; glDeleteBuffers(1, &mUBO); mUBO = 0; + + // note: also called on teleport (not just shutdown), so make sure we're in a good "starting" state + initCubeFree(); } -- cgit v1.2.3