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:
-rw-r--r--source/blender/gpu/intern/gpu_matrix.c17
1 files changed, 14 insertions, 3 deletions
diff --git a/source/blender/gpu/intern/gpu_matrix.c b/source/blender/gpu/intern/gpu_matrix.c
index 2c9bc842083..579c1de181f 100644
--- a/source/blender/gpu/intern/gpu_matrix.c
+++ b/source/blender/gpu/intern/gpu_matrix.c
@@ -40,6 +40,8 @@
* we convert all code to use the API in this file. */
#define SUPPORT_LEGACY_MATRIX 1
+#define DEBUG_MATRIX_BIND 0
+
#define MATRIX_STACK_DEPTH 32
typedef float Mat4[4][4];
@@ -594,17 +596,26 @@ void gpuBindMatrices(GLuint program)
/* call this portion before a draw call if desired matrices are dirty */
if (loc_MV != -1) {
- puts("setting MV matrix");
+ #if DEBUG_MATRIX_BIND
+ puts("setting 3D MV matrix");
+ #endif
+
glUniformMatrix4fv(loc_MV, 1, GL_FALSE, gpuGetModelViewMatrix3D(NULL));
}
if (loc_P != -1) {
- puts("setting P matrix");
+ #if DEBUG_MATRIX_BIND
+ puts("setting 3D P matrix");
+ #endif
+
glUniformMatrix4fv(loc_P, 1, GL_FALSE, gpuGetProjectionMatrix3D(NULL));
}
if (loc_MVP != -1) {
- puts("setting MVP matrix");
+ #if DEBUG_MATRIX_BIND
+ puts("setting 3D MVP matrix");
+ #endif
+
glUniformMatrix4fv(loc_MVP, 1, GL_FALSE, gpuGetModelViewProjectionMatrix3D(NULL));
}
}