From fc176f61fe918c379677fd62dadb1beae59dfce8 Mon Sep 17 00:00:00 2001 From: havoc Date: Fri, 31 Mar 2006 03:38:34 +0000 Subject: [PATCH] print out the contents of the GLSL shader when it is compiled when using developer 100 or higher git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@6216 d7cf8633-e32d-0410-b094-e92efae38249 --- gl_backend.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/gl_backend.c b/gl_backend.c index 16e4377d..c32162a4 100644 --- a/gl_backend.c +++ b/gl_backend.c @@ -724,6 +724,26 @@ unsigned int GL_Backend_CompileProgram(int vertexstrings_count, const char **ver if (!programobject) return 0; + if (developer.integer >= 100) + { + int i; + Con_Printf("Compiling shader:\n"); + if (vertexstrings_count) + { + Con_Printf("------ VERTEX SHADER ------\n"); + for (i = 0;i < vertexstrings_count;i++) + Con_Print(vertexstrings_list[i]); + Con_Print("\n"); + } + if (fragmentstrings_count) + { + Con_Printf("------ FRAGMENT SHADER ------\n"); + for (i = 0;i < fragmentstrings_count;i++) + Con_Print(fragmentstrings_list[i]); + Con_Print("\n"); + } + } + if (vertexstrings_count) { CHECKGLERROR -- 2.39.2