Commit: dde4fc63ff7b3b359707c7da0dfb5a6156bd5ede
Author: Brecht Van Lommel
Date:   Fri Dec 11 02:53:21 2015 +0100
Branches: master
https://developer.blender.org/rBdde4fc63ff7b3b359707c7da0dfb5a6156bd5ede

Fix T46951: GLSL draw mode missing some textures.

===================================================================

M       source/blender/gpu/intern/gpu_codegen.c

===================================================================

diff --git a/source/blender/gpu/intern/gpu_codegen.c 
b/source/blender/gpu/intern/gpu_codegen.c
index 800ed93..1db44c5 100644
--- a/source/blender/gpu/intern/gpu_codegen.c
+++ b/source/blender/gpu/intern/gpu_codegen.c
@@ -1000,18 +1000,21 @@ void GPU_pass_bind(GPUPass *pass, double time, int 
mipmap)
 
        GPU_shader_bind(shader);
 
-       /* now bind the textures */
+       /* create the textures */
        for (input = inputs->first; input; input = input->next) {
                if (input->ima)
                        input->tex = GPU_texture_from_blender(input->ima, 
input->iuser, input->image_isdata, time, mipmap);
                else if (input->prv)
                        input->tex = GPU_texture_from_preview(input->prv, 
mipmap);
+       }
 
+       /* bind the textures, in second loop so texture binding during
+        * create doesn't overwrite already bound textures */
+       for (input = inputs->first; input; input = input->next) {
                if (input->tex && input->bindtex) {
                        GPU_texture_bind(input->tex, input->texid);
                        GPU_shader_uniform_texture(shader, input->shaderloc, 
input->tex);
                }
-                       
        }
 }

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to