Skip to content
Snippets Groups Projects
Commit 0b717e2d authored by Ptolemy's avatar Ptolemy
Browse files

SL-10449 Cleanup dumping shader without LOG spam on every line when it fails to compile/link

parent 4051f575
No related branches found
No related tags found
No related merge requests found
...@@ -572,18 +572,7 @@ void LLShaderMgr::dumpShaderSource(U32 shader_code_count, GLcharARB** shader_cod ...@@ -572,18 +572,7 @@ void LLShaderMgr::dumpShaderSource(U32 shader_code_count, GLcharARB** shader_cod
{ {
for (U32 i = 0; i < shader_code_count; i++) for (U32 i = 0; i < shader_code_count; i++)
{ {
GLcharARB *line = shader_code_text[i]; fprintf(stderr, "%4d: %s", i+1, shader_code_text[i]);
size_t len = strlen( line );
GLcharARB last = len > 0 ? line[len - 1] : 0;
// LL_ENDL already outputs a newline so temporarily strip off the end newline to prevent EVERY line outputting an (extra) blank line
if (last == '\n')
line[len - 1] = 0;
LL_SHADER_LOADING_WARNS() << i+1 << ": " << shader_code_text[i] << LL_ENDL;
if (last == '\n')
line[len - 1] = '\n';
} }
LL_SHADER_LOADING_WARNS() << LL_ENDL; LL_SHADER_LOADING_WARNS() << LL_ENDL;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment