summaryrefslogtreecommitdiff
path: root/indra/llrender/llgl.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llrender/llgl.cpp')
-rw-r--r--indra/llrender/llgl.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/indra/llrender/llgl.cpp b/indra/llrender/llgl.cpp
index 96b1838158..a8d7df3bc8 100644
--- a/indra/llrender/llgl.cpp
+++ b/indra/llrender/llgl.cpp
@@ -551,7 +551,7 @@ bool LLGLManager::initGL()
{
GLint num_tex_image_units;
glGetIntegerv(GL_MAX_TEXTURE_IMAGE_UNITS_ARB, &num_tex_image_units);
- mNumTextureImageUnits = num_tex_image_units;
+ mNumTextureImageUnits = llmin(num_tex_image_units, 32);
}
if (mHasTextureMultisample)
@@ -1516,6 +1516,7 @@ void LLGLState::checkTextureChannels(const std::string& msg)
}
}
+ stop_glerror();
gGL.getTexUnit(0)->activate();
glClientActiveTextureARB(GL_TEXTURE0_ARB);
stop_glerror();