summaryrefslogtreecommitdiff
path: root/indra/llrender
diff options
context:
space:
mode:
authorDave Parks <davep@lindenlab.com>2012-12-18 16:39:48 -0600
committerDave Parks <davep@lindenlab.com>2012-12-18 16:39:48 -0600
commit615af0c556d599b0804874efbde8eba05bef5172 (patch)
tree2c3f8ad9b8e52ceb8546284e928ac1d7ec7d8b8c /indra/llrender
parentd2b7857721b789f0483bcf6df6b5baaab2216d6b (diff)
MAINT-2150 Fix for super-large ( > 4096 ) snapshots having black borders
Diffstat (limited to 'indra/llrender')
-rw-r--r--indra/llrender/llgl.cpp3
-rw-r--r--indra/llrender/llgl.h1
-rw-r--r--indra/llrender/llrendertarget.cpp4
3 files changed, 5 insertions, 3 deletions
diff --git a/indra/llrender/llgl.cpp b/indra/llrender/llgl.cpp
index 9e4857b6bc..9d06dd6904 100644
--- a/indra/llrender/llgl.cpp
+++ b/indra/llrender/llgl.cpp
@@ -1132,7 +1132,8 @@ void LLGLManager::initExtensions()
// Misc
glGetIntegerv(GL_MAX_ELEMENTS_VERTICES, (GLint*) &mGLMaxVertexRange);
glGetIntegerv(GL_MAX_ELEMENTS_INDICES, (GLint*) &mGLMaxIndexRange);
-
+ glGetIntegerv(GL_MAX_TEXTURE_SIZE, (GLint*) &mGLMaxTextureSize);
+
#if (LL_WINDOWS || LL_LINUX || LL_SOLARIS) && !LL_MESA_HEADLESS
LL_DEBUGS("RenderInit") << "GL Probe: Getting symbols" << LL_ENDL;
if (mHasVertexBufferObject)
diff --git a/indra/llrender/llgl.h b/indra/llrender/llgl.h
index d70e764769..823de9d361 100644
--- a/indra/llrender/llgl.h
+++ b/indra/llrender/llgl.h
@@ -147,6 +147,7 @@ public:
S32 mVRAM; // VRAM in MB
S32 mGLMaxVertexRange;
S32 mGLMaxIndexRange;
+ S32 mGLMaxTextureSize;
void getPixelFormat(); // Get the best pixel format
diff --git a/indra/llrender/llrendertarget.cpp b/indra/llrender/llrendertarget.cpp
index c1b96a43da..e35feda2d5 100644
--- a/indra/llrender/llrendertarget.cpp
+++ b/indra/llrender/llrendertarget.cpp
@@ -109,8 +109,8 @@ void LLRenderTarget::resize(U32 resx, U32 resy, U32 color_fmt)
bool LLRenderTarget::allocate(U32 resx, U32 resy, U32 color_fmt, bool depth, bool stencil, LLTexUnit::eTextureType usage, bool use_fbo, S32 samples)
{
- resx = llmin(resx, (U32) 4096);
- resy = llmin(resy, (U32) 4096);
+ resx = llmin(resx, (U32) gGLManager.mGLMaxTextureSize);
+ resy = llmin(resy, (U32) gGLManager.mGLMaxTextureSize);
stop_glerror();
release();