From c330f3713563fff855bfe69e44b070a956925d24 Mon Sep 17 00:00:00 2001 From: Mike Erwin Date: Tue, 11 Oct 2016 14:44:12 -0400 Subject: [PATCH] quiet GPU matrix debug printing Will be needed soon but turn it off by default. Part of T49450 --- source/blender/gpu/intern/gpu_matrix.c | 17 ++++++++++++++--- 1 file 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)); } }