summaryrefslogtreecommitdiff
path: root/indra/llrender
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llrender')
-rw-r--r--indra/llrender/llglslshader.cpp8
-rw-r--r--indra/llrender/llshadermgr.cpp38
2 files changed, 8 insertions, 38 deletions
diff --git a/indra/llrender/llglslshader.cpp b/indra/llrender/llglslshader.cpp
index f0cc9acc06..de15d1d75b 100644
--- a/indra/llrender/llglslshader.cpp
+++ b/indra/llrender/llglslshader.cpp
@@ -487,18 +487,18 @@ BOOL LLGLSLShader::createShader(std::vector<LLStaticHashedString> * attributes,
return success;
}
-BOOL LLGLSLShader::attachObject(std::string object)
+BOOL LLGLSLShader::attachObject(std::string object_path)
{
- if (LLShaderMgr::instance()->mShaderObjects.count(object) > 0)
+ if (LLShaderMgr::instance()->mShaderObjects.count(object_path) > 0)
{
stop_glerror();
- glAttachObjectARB(mProgramObject, LLShaderMgr::instance()->mShaderObjects[object]);
+ glAttachObjectARB(mProgramObject, LLShaderMgr::instance()->mShaderObjects[object_path]);
stop_glerror();
return TRUE;
}
else
{
- LL_SHADER_LOADING_WARNS() << "Attempting to attach shader object that hasn't been compiled: " << object << LL_ENDL;
+ LL_SHADER_LOADING_WARNS() << "Attempting to attach shader object: '" << object_path << "' that hasn't been compiled." << LL_ENDL;
return FALSE;
}
}
diff --git a/indra/llrender/llshadermgr.cpp b/indra/llrender/llshadermgr.cpp
index 9da705bb2d..d6fe35e2ca 100644
--- a/indra/llrender/llshadermgr.cpp
+++ b/indra/llrender/llshadermgr.cpp
@@ -628,7 +628,7 @@ GLhandleARB LLShaderMgr::loadShaderFile(const std::string& filename, S32 & shade
if (file == NULL)
{
- LL_SHADER_LOADING_WARNS() << "GLSL Shader file not found: " << filename << LL_ENDL;
+ LL_SHADER_LOADING_WARNS() << "GLSL Shader file not found: " << open_file_name << LL_ENDL;
return 0;
}
@@ -958,38 +958,8 @@ GLhandleARB LLShaderMgr::loadShaderFile(const std::string& filename, S32 & shade
{
//an error occured, print log
LL_WARNS("ShaderLoading") << "GLSL Compilation Error:" << LL_ENDL;
- dumpObjectLog(ret, TRUE, filename);
-#if LL_WINDOWS
- std::stringstream ostr;
- //dump shader source for debugging
- for (GLuint i = 0; i < shader_code_count; i++)
- {
- ostr << i << ": " << shader_code_text[i];
-
- if (i % 128 == 0)
- { //dump every 128 lines
-
- LL_WARNS("ShaderLoading") << "\n" << ostr.str() << LL_ENDL;
- ostr = std::stringstream();
- }
-
- }
-
- LL_WARNS("ShaderLoading") << "\n" << ostr.str() << LL_ENDL;
-#else
- std::string str;
-
- for (GLuint i = 0; i < shader_code_count; i++) {
- str.append(shader_code_text[i]);
-
- if (i % 128 == 0)
- {
- LL_WARNS("ShaderLoading") << str << LL_ENDL;
- str = "";
- }
- }
-#endif
-
+ dumpObjectLog(ret, TRUE, open_file_name);
+ dumpShaderSource(shader_code_count, shader_code_text);
ret = 0;
}
}
@@ -1018,7 +988,7 @@ GLhandleARB LLShaderMgr::loadShaderFile(const std::string& filename, S32 & shade
if (shader_level > 1)
{
shader_level--;
- return loadShaderFile(filename,shader_level,type, defines, texture_index_channels);
+ return loadShaderFile(filename, shader_level, type, defines, texture_index_channels);
}
LL_WARNS("ShaderLoading") << "Failed to load " << filename << LL_ENDL;
}