]> de.git.xonotic.org Git - xonotic/darkplaces.git/commitdiff
Fix shader compile log again. Print error in any case, warnings only if developer...
authorvortex <vortex@d7cf8633-e32d-0410-b094-e92efae38249>
Sun, 19 Feb 2012 00:43:54 +0000 (00:43 +0000)
committervortex <vortex@d7cf8633-e32d-0410-b094-e92efae38249>
Sun, 19 Feb 2012 00:43:54 +0000 (00:43 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@11702 d7cf8633-e32d-0410-b094-e92efae38249

gl_backend.c

index 2f14c54a4c8ec76684c433d79926030003dce7e2..fefedcb37402264b7905d670225ee3d04d9f69e3 100644 (file)
@@ -2630,14 +2630,14 @@ static qboolean GL_Backend_CompileShader(int programobject, GLenum shadertypeenu
        qglCompileShader(shaderobject);CHECKGLERROR
        qglGetShaderiv(shaderobject, GL_COMPILE_STATUS, &shadercompiled);CHECKGLERROR
        qglGetShaderInfoLog(shaderobject, sizeof(compilelog), NULL, compilelog);CHECKGLERROR
-       if (compilelog[0] && (strstr(compilelog, "error") || strstr(compilelog, "ERROR") || strstr(compilelog, "Error") || strstr(compilelog, "WARNING") || strstr(compilelog, "warning") || strstr(compilelog, "Warning") || developer_extra.integer))
+       if (compilelog[0] && ((strstr(compilelog, "error") || strstr(compilelog, "ERROR") || strstr(compilelog, "Error")) || ((strstr(compilelog, "WARNING") || strstr(compilelog, "warning") || strstr(compilelog, "Warning")) && developer.integer) || developer_extra.integer))
        {
                int i, j, pretextlines = 0;
                for (i = 0;i < numstrings - 1;i++)
                        for (j = 0;strings[i][j];j++)
                                if (strings[i][j] == '\n')
                                        pretextlines++;
-               Con_DPrintf("%s shader compile log:\n%s\n(line offset for any above warnings/errors: %i)\n", shadertype, compilelog, pretextlines);
+               Con_Printf("%s shader compile log:\n%s\n(line offset for any above warnings/errors: %i)\n", shadertype, compilelog, pretextlines);
        }
        if (!shadercompiled)
        {