From cf389276da45f564c9fcd6b0d8886096fa39d759 Mon Sep 17 00:00:00 2001 From: rdb Date: Sun, 27 Nov 2016 13:04:54 +0100 Subject: [PATCH] Backport b02e352 to 1.9: rdb: Fix wrong GL texture being bound to image slot after being recreated --- panda/src/glstuff/glShaderContext_src.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/panda/src/glstuff/glShaderContext_src.cxx b/panda/src/glstuff/glShaderContext_src.cxx index 5ce322bfac..6c68aeb4a6 100644 --- a/panda/src/glstuff/glShaderContext_src.cxx +++ b/panda/src/glstuff/glShaderContext_src.cxx @@ -1684,8 +1684,8 @@ update_shader_texture_bindings(ShaderContext *prev) { if (gtc != (TextureContext*)NULL) { _glsl_img_textures[i] = gtc; - gl_tex = gtc->_index; _glgsg->update_texture(gtc, true); + gl_tex = gtc->_index; if (gtc->needs_barrier(GL_SHADER_IMAGE_ACCESS_BARRIER_BIT)) { barriers |= GL_SHADER_IMAGE_ACCESS_BARRIER_BIT;