Dump shaders source if compile fails

This commit is contained in:
Flyinghead 2018-07-16 16:52:11 +02:00
parent 0284d635d2
commit dc835dd64d
2 changed files with 4 additions and 1 deletions

View File

@ -203,7 +203,6 @@ TA_context* tactx_Alloc()
{
rv = new TA_context();
rv->Alloc();
printf("new tactx\n");
}
return rv;

View File

@ -749,6 +749,10 @@ GLuint gl_CompileAndLink(const char* VertexShader, const char* FragmentShader)
printf("Shader linking: %s \n (%d bytes), - %s -\n",result?"linked":"failed to link", compile_log_len,compile_log);
free(compile_log);
// Dump the shaders source for troubleshooting
printf("// VERTEX SHADER\n%s\n// END\n", VertexShader);
printf("// FRAGMENT SHADER\n%s\n// END\n", FragmentShader);
die("shader compile fail\n");
}