summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/video_core/renderer_opengl/gl_state.cpp13
1 files changed, 5 insertions, 8 deletions
diff --git a/src/video_core/renderer_opengl/gl_state.cpp b/src/video_core/renderer_opengl/gl_state.cpp
index 3526e16d5..9efc15337 100644
--- a/src/video_core/renderer_opengl/gl_state.cpp
+++ b/src/video_core/renderer_opengl/gl_state.cpp
@@ -147,20 +147,17 @@ void OpenGLState::Apply() {
147 147
148 // Textures 148 // Textures
149 for (unsigned texture_index = 0; texture_index < ARRAY_SIZE(texture_units); ++texture_index) { 149 for (unsigned texture_index = 0; texture_index < ARRAY_SIZE(texture_units); ++texture_index) {
150 if (texture_units[texture_index].enabled_2d != cur_state.texture_units[texture_index].enabled_2d) { 150 if (texture_units[texture_index].enabled_2d != cur_state.texture_units[texture_index].enabled_2d ||
151 texture_units[texture_index].texture_2d != cur_state.texture_units[texture_index].texture_2d) {
152
151 glActiveTexture(GL_TEXTURE0 + texture_index); 153 glActiveTexture(GL_TEXTURE0 + texture_index);
152 154
153 if (texture_units[texture_index].enabled_2d) { 155 if (texture_units[texture_index].enabled_2d) {
154 glEnable(GL_TEXTURE_2D); 156 glBindTexture(GL_TEXTURE_2D, texture_units[texture_index].texture_2d);
155 } else { 157 } else {
156 glDisable(GL_TEXTURE_2D); 158 glBindTexture(GL_TEXTURE_2D, 0);
157 } 159 }
158 } 160 }
159
160 if (texture_units[texture_index].texture_2d != cur_state.texture_units[texture_index].texture_2d) {
161 glActiveTexture(GL_TEXTURE0 + texture_index);
162 glBindTexture(GL_TEXTURE_2D, texture_units[texture_index].texture_2d);
163 }
164 } 161 }
165 162
166 // Framebuffer 163 // Framebuffer