Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrecht Van Lommel <brechtvanlommel@gmail.com>2015-12-11 04:53:21 +0300
committerBrecht Van Lommel <brechtvanlommel@gmail.com>2015-12-11 05:03:33 +0300
commitdde4fc63ff7b3b359707c7da0dfb5a6156bd5ede (patch)
treeb47acca27ccf0bf9ea1a9262f97630d7affbcff5 /source/blender/gpu/intern/gpu_codegen.c
parentc593855b29f7abd0c4f6e54a5b48900987738ee4 (diff)
Fix T46951: GLSL draw mode missing some textures.
Diffstat (limited to 'source/blender/gpu/intern/gpu_codegen.c')
-rw-r--r--source/blender/gpu/intern/gpu_codegen.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/source/blender/gpu/intern/gpu_codegen.c b/source/blender/gpu/intern/gpu_codegen.c
index 800ed9399a9..1db44c5b3a9 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);
}
-
}
}