summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--indra/llrender/llshadermgr.cpp12
1 files changed, 9 insertions, 3 deletions
diff --git a/indra/llrender/llshadermgr.cpp b/indra/llrender/llshadermgr.cpp
index 86eea458c5..539091c1aa 100644
--- a/indra/llrender/llshadermgr.cpp
+++ b/indra/llrender/llshadermgr.cpp
@@ -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)