summaryrefslogtreecommitdiff
path: root/indra/llrender/llgl.cpp
diff options
context:
space:
mode:
authorDave Parks <davep@lindenlab.com>2012-03-02 13:35:10 -0600
committerDave Parks <davep@lindenlab.com>2012-03-02 13:35:10 -0600
commitf53fa08c7069f7f604f3fcab70d65af8bb616f08 (patch)
treeccd6ee9ea9333aab8a8cadd697d488be81ca8c41 /indra/llrender/llgl.cpp
parent302f4085a5f9fd7b5267fd573a8e15f890cfe573 (diff)
MAINT-708 Use texture compression to minimize memory bloat (experimental)
Diffstat (limited to 'indra/llrender/llgl.cpp')
-rw-r--r--indra/llrender/llgl.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/indra/llrender/llgl.cpp b/indra/llrender/llgl.cpp
index 197bc2b422..b99465ee47 100644
--- a/indra/llrender/llgl.cpp
+++ b/indra/llrender/llgl.cpp
@@ -94,6 +94,10 @@ void APIENTRY gl_debug_callback(GLenum source,
llwarns << "Severity: " << std::hex << severity << llendl;
llwarns << "Message: " << message << llendl;
llwarns << "-----------------------" << llendl;
+ if (severity == GL_DEBUG_SEVERITY_HIGH_ARB)
+ {
+ llerrs << "Halting on GL Error" << llendl;
+ }
}
#endif
@@ -572,6 +576,15 @@ bool LLGLManager::initGL()
#endif
}
+ if (mGLVersion >= 3.f && LLImageGL::sCompressTextures)
+ { //use texture compression
+ glHint(GL_TEXTURE_COMPRESSION_HINT, GL_FASTEST);
+ }
+ else
+ { //GL version is < 3.0, always disable texture compression
+ LLImageGL::sCompressTextures = false;
+ }
+
// Trailing space necessary to keep "nVidia Corpor_ati_on" cards
// from being recognized as ATI.
if (mGLVendor.substr(0,4) == "ATI ")