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

SL-10449: Add dumping of shader to log file

parent 9e8e6231
No related branches found
No related tags found
No related merge requests found
......@@ -569,12 +569,18 @@ static std::string get_object_log(GLhandleARB ret)
//dump shader source for debugging
void LLShaderMgr::dumpShaderSource(U32 shader_code_count, GLcharARB** shader_code_text)
{
{
char num_str[16]; // U32 = max 10 digits
LL_SHADER_LOADING_WARNS() << "\n";
for (U32 i = 0; i < shader_code_count; i++)
{
fprintf(stderr, "%4d: %s", i+1, shader_code_text[i]);
snprintf(num_str, sizeof(num_str), "%4d: ", i+1);
std::string line_number(num_str);
LL_CONT << line_number << shader_code_text[i];
}
LL_SHADER_LOADING_WARNS() << LL_ENDL;
LL_CONT << LL_ENDL;
}
void LLShaderMgr::dumpObjectLog(GLhandleARB ret, BOOL warns, const std::string& filename)
......
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