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
This commit is contained in:
Mike Erwin
2017-03-26 21:07:58 -04:00
parent a68cc0dc26
commit cc53c180ac

View File

@@ -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)