summaryrefslogtreecommitdiff
path: root/indra/newview/llreflectionmapmanager.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llreflectionmapmanager.cpp')
-rw-r--r--indra/newview/llreflectionmapmanager.cpp16
1 files changed, 9 insertions, 7 deletions
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
@@ -41,6 +41,11 @@ extern BOOL gTeleportDisplay;
LLReflectionMapManager::LLReflectionMapManager()
{
+ initCubeFree();
+}
+
+void LLReflectionMapManager::initCubeFree()
+{
for (int i = 1; i < LL_MAX_REFLECTION_PROBE_COUNT; ++i)
{
mCubeFree[i] = true;
@@ -50,12 +55,6 @@ LLReflectionMapManager::LLReflectionMapManager()
mCubeFree[0] = false;
}
-struct CompareReflectionMapDistance
-{
-
-};
-
-
struct CompareProbeDistance
{
bool operator()(const LLPointer<LLReflectionMap>& lhs, const LLPointer<LLReflectionMap>& 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();
}