Dump shaders source if compile fails
This commit is contained in:
parent
0284d635d2
commit
dc835dd64d
|
@ -203,7 +203,6 @@ TA_context* tactx_Alloc()
|
|||
{
|
||||
rv = new TA_context();
|
||||
rv->Alloc();
|
||||
printf("new tactx\n");
|
||||
}
|
||||
|
||||
return rv;
|
||||
|
|
|
@ -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");
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue