]> de.git.xonotic.org Git - xonotic/darkplaces.git/commitdiff
print out the contents of the GLSL shader when it is compiled when using developer...
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Fri, 31 Mar 2006 03:38:34 +0000 (03:38 +0000)
committerhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Fri, 31 Mar 2006 03:38:34 +0000 (03:38 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@6216 d7cf8633-e32d-0410-b094-e92efae38249

gl_backend.c

index 16e4377d170108ff9b090c15131a4a18c0877fd2..c32162a4580edc7ee1fc31e65cab624906f81e94 100644 (file)
@@ -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