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:
authorMike Erwin <significant.bit@gmail.com>2016-10-11 21:44:12 +0300
committerMike Erwin <significant.bit@gmail.com>2016-10-11 21:44:12 +0300
commitc330f3713563fff855bfe69e44b070a956925d24 (patch)
tree41f9914b00d78bd87dbf0c394bdb5900c1728731 /source/blender/gpu
parent53d82c3e8d608bc05e40e26950a98d15b16c562c (diff)
quiet GPU matrix debug printing
Will be needed soon but turn it off by default. Part of T49450
Diffstat (limited to 'source/blender/gpu')
-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));
}
}