[Bf-blender-cvs] [c330f37] blender2.8: quiet GPU matrix debug printing
Mike Erwin
noreply at git.blender.org
Tue Oct 11 20:44:33 CEST 2016
Commit: c330f3713563fff855bfe69e44b070a956925d24
Author: Mike Erwin
Date: Tue Oct 11 14:44:12 2016 -0400
Branches: blender2.8
https://developer.blender.org/rBc330f3713563fff855bfe69e44b070a956925d24
quiet GPU matrix debug printing
Will be needed soon but turn it off by default.
Part of T49450
===================================================================
M source/blender/gpu/intern/gpu_matrix.c
===================================================================
diff --git a/source/blender/gpu/intern/gpu_matrix.c b/source/blender/gpu/intern/gpu_matrix.c
index 2c9bc84..579c1de 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));
}
}
More information about the Bf-blender-cvs
mailing list