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.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/indra/newview/llreflectionmapmanager.cpp b/indra/newview/llreflectionmapmanager.cpp
index 846f8a895a..ad8d6ff7bf 100644
--- a/indra/newview/llreflectionmapmanager.cpp
+++ b/indra/newview/llreflectionmapmanager.cpp
@@ -80,6 +80,9 @@ void load_exr(const std::string& filename)
gGL.getTexUnit(0)->bind(gEXRImage);
glTexImage2D(GL_TEXTURE_2D, 0, GL_RGB16F, width, height, 0, GL_RGBA, GL_FLOAT, out);
+
+ LLImageGLMemory::alloc_tex_image(width, height, GL_RGB16F, 1);
+
free(out); // release memory of image data
glGenerateMipmap(GL_TEXTURE_2D);
@@ -460,6 +463,11 @@ void LLReflectionMapManager::update()
LLReflectionMap* LLReflectionMapManager::addProbe(LLSpatialGroup* group)
{
+ if (gGLManager.mGLVersion < 4.05f || !LLPipeline::sReflectionProbesEnabled)
+ {
+ return nullptr;
+ }
+
LLReflectionMap* probe = new LLReflectionMap();
probe->mGroup = group;
@@ -571,6 +579,11 @@ LLReflectionMap* LLReflectionMapManager::registerSpatialGroup(LLSpatialGroup* gr
LLReflectionMap* LLReflectionMapManager::registerViewerObject(LLViewerObject* vobj)
{
+ if (!LLPipeline::sReflectionProbesEnabled)
+ {
+ return nullptr;
+ }
+
llassert(vobj != nullptr);
LLReflectionMap* probe = new LLReflectionMap();