Browse Source

Fix wrong GL texture being bound to image slot after being recreated

rdb 9 years ago
parent
commit
b02e3521bc
1 changed files with 1 additions and 1 deletions
  1. 1 1
      panda/src/glstuff/glShaderContext_src.cxx

+ 1 - 1
panda/src/glstuff/glShaderContext_src.cxx

@@ -2446,8 +2446,8 @@ update_shader_texture_bindings(ShaderContext *prev) {
         if (gtc != (TextureContext*)NULL) {
         if (gtc != (TextureContext*)NULL) {
           input._gtc = gtc;
           input._gtc = gtc;
 
 
-          gl_tex = gtc->_index;
           _glgsg->update_texture(gtc, true);
           _glgsg->update_texture(gtc, true);
+          gl_tex = gtc->_index;
 
 
           if (gtc->needs_barrier(GL_SHADER_IMAGE_ACCESS_BARRIER_BIT)) {
           if (gtc->needs_barrier(GL_SHADER_IMAGE_ACCESS_BARRIER_BIT)) {
             barriers |= GL_SHADER_IMAGE_ACCESS_BARRIER_BIT;
             barriers |= GL_SHADER_IMAGE_ACCESS_BARRIER_BIT;