[Bf-blender-cvs] [cc53c180ace] blender2.8: GPU_shader automatically uses new matrix values

Mike Erwin noreply at git.blender.org
Mon Mar 27 07:18:18 CEST 2017


Commit: cc53c180acea384e451af547b1e6aeff3107adde
Author: Mike Erwin
Date:   Sun Mar 26 21:07:58 2017 -0400
Branches: blender2.8
https://developer.blender.org/rBcc53c180acea384e451af547b1e6aeff3107adde

GPU_shader automatically uses new matrix values

Whether used from Gawain or from traditional OpenGL draw methods.

TODO: make sure we bind matrices only once per shader change.

Part of T49450

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

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

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

diff --git a/source/blender/gpu/intern/gpu_shader.c b/source/blender/gpu/intern/gpu_shader.c
index d2d8011829b..711a6a180a3 100644
--- a/source/blender/gpu/intern/gpu_shader.c
+++ b/source/blender/gpu/intern/gpu_shader.c
@@ -39,6 +39,7 @@
 #include "GPU_shader.h"
 #include "GPU_uniformbuffer.h"
 #include "GPU_texture.h"
+#include "GPU_matrix.h"
 
 #include "gpu_shader_private.h"
 
@@ -505,6 +506,7 @@ void GPU_shader_bind(GPUShader *shader)
 	BLI_assert(shader && shader->program);
 
 	glUseProgram(shader->program);
+	gpuBindMatrices(shader->program);
 }
 
 void GPU_shader_unbind(void)




More information about the Bf-blender-cvs mailing list