diff options
author | Jacek Antonelli | 2008-08-15 23:44:56 -0500 |
---|---|---|
committer | Jacek Antonelli | 2008-08-15 23:44:56 -0500 |
commit | c07901e29ed545bbb02e3bddf148fe1104b94e9f (patch) | |
tree | f1ada64ce834acd7d92a425efb96c4b86bcf16b1 /linden/indra/llrender/llimagegl.cpp | |
parent | Second Life viewer sources 1.15.0.2 (diff) | |
download | meta-impy-c07901e29ed545bbb02e3bddf148fe1104b94e9f.zip meta-impy-c07901e29ed545bbb02e3bddf148fe1104b94e9f.tar.gz meta-impy-c07901e29ed545bbb02e3bddf148fe1104b94e9f.tar.bz2 meta-impy-c07901e29ed545bbb02e3bddf148fe1104b94e9f.tar.xz |
Second Life viewer sources 1.15.1.3
Diffstat (limited to '')
-rw-r--r-- | linden/indra/llrender/llimagegl.cpp | 24 |
1 files changed, 16 insertions, 8 deletions
diff --git a/linden/indra/llrender/llimagegl.cpp b/linden/indra/llrender/llimagegl.cpp index 464507e..e2c4a59 100644 --- a/linden/indra/llrender/llimagegl.cpp +++ b/linden/indra/llrender/llimagegl.cpp | |||
@@ -129,19 +129,27 @@ void LLImageGL::bindExternalTexture(LLGLuint gl_name, S32 stage, LLGLenum bind_t | |||
129 | // static | 129 | // static |
130 | void LLImageGL::unbindTexture(S32 stage, LLGLenum bind_target) | 130 | void LLImageGL::unbindTexture(S32 stage, LLGLenum bind_target) |
131 | { | 131 | { |
132 | glActiveTextureARB(GL_TEXTURE0_ARB + stage); | 132 | // LLGLSLShader can return -1 |
133 | glClientActiveTextureARB(GL_TEXTURE0_ARB + stage); | 133 | if (stage >= 0) |
134 | glBindTexture(bind_target, 0); | 134 | { |
135 | sCurrentBoundTextures[stage] = 0; | 135 | glActiveTextureARB(GL_TEXTURE0_ARB + stage); |
136 | glClientActiveTextureARB(GL_TEXTURE0_ARB + stage); | ||
137 | glBindTexture(bind_target, 0); | ||
138 | sCurrentBoundTextures[stage] = 0; | ||
139 | } | ||
136 | } | 140 | } |
137 | 141 | ||
138 | // static (duplicated for speed and to avoid GL_TEXTURE_2D default argument which requires GL header dependency) | 142 | // static (duplicated for speed and to avoid GL_TEXTURE_2D default argument which requires GL header dependency) |
139 | void LLImageGL::unbindTexture(S32 stage) | 143 | void LLImageGL::unbindTexture(S32 stage) |
140 | { | 144 | { |
141 | glActiveTextureARB(GL_TEXTURE0_ARB + stage); | 145 | // LLGLSLShader can return -1 |
142 | glClientActiveTextureARB(GL_TEXTURE0_ARB + stage); | 146 | if (stage >= 0) |
143 | glBindTexture(GL_TEXTURE_2D, 0); | 147 | { |
144 | sCurrentBoundTextures[stage] = 0; | 148 | glActiveTextureARB(GL_TEXTURE0_ARB + stage); |
149 | glClientActiveTextureARB(GL_TEXTURE0_ARB + stage); | ||
150 | glBindTexture(GL_TEXTURE_2D, 0); | ||
151 | sCurrentBoundTextures[stage] = 0; | ||
152 | } | ||
145 | } | 153 | } |
146 | 154 | ||
147 | // static | 155 | // static |