summaryrefslogtreecommitdiff
path: root/indra/llrender/llshadermgr.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llrender/llshadermgr.cpp')
-rw-r--r--indra/llrender/llshadermgr.cpp86
1 files changed, 43 insertions, 43 deletions
diff --git a/indra/llrender/llshadermgr.cpp b/indra/llrender/llshadermgr.cpp
index f78be910d2..edb5f65e1f 100644
--- a/indra/llrender/llshadermgr.cpp
+++ b/indra/llrender/llshadermgr.cpp
@@ -65,14 +65,14 @@ LLShaderMgr * LLShaderMgr::instance()
return sInstance;
}
-BOOL LLShaderMgr::attachShaderFeatures(LLGLSLShader * shader)
+bool LLShaderMgr::attachShaderFeatures(LLGLSLShader * shader)
{
llassert_always(shader != NULL);
LLShaderFeatures *features = & shader->mFeatures;
if (features->attachNothing)
{
- return TRUE;
+ return true;
}
//////////////////////////////////////
// Attach Vertex Shader Features First
@@ -83,7 +83,7 @@ BOOL LLShaderMgr::attachShaderFeatures(LLGLSLShader * shader)
{
if (!shader->attachVertexObject("windlight/atmosphericsVarsV.glsl"))
{
- return FALSE;
+ return false;
}
}
@@ -91,7 +91,7 @@ BOOL LLShaderMgr::attachShaderFeatures(LLGLSLShader * shader)
{
if (!shader->attachVertexObject("windlight/atmosphericsHelpersV.glsl"))
{
- return FALSE;
+ return false;
}
}
@@ -101,40 +101,40 @@ BOOL LLShaderMgr::attachShaderFeatures(LLGLSLShader * shader)
{
if (!shader->attachVertexObject("lighting/lightFuncSpecularV.glsl"))
{
- return FALSE;
+ return false;
}
if (!features->isAlphaLighting)
{
if (!shader->attachVertexObject("lighting/sumLightsSpecularV.glsl"))
{
- return FALSE;
+ return false;
}
}
if (!shader->attachVertexObject("lighting/lightSpecularV.glsl"))
{
- return FALSE;
+ return false;
}
}
else
{
if (!shader->attachVertexObject("lighting/lightFuncV.glsl"))
{
- return FALSE;
+ return false;
}
if (!features->isAlphaLighting)
{
if (!shader->attachVertexObject("lighting/sumLightsV.glsl"))
{
- return FALSE;
+ return false;
}
}
if (!shader->attachVertexObject("lighting/lightV.glsl"))
{
- return FALSE;
+ return false;
}
}
}
@@ -144,16 +144,16 @@ BOOL LLShaderMgr::attachShaderFeatures(LLGLSLShader * shader)
{
if (!shader->attachVertexObject("environment/srgbF.glsl")) // NOTE -- "F" suffix is superfluous here, there is nothing fragment specific in srgbF
{
- return FALSE;
+ return false;
}
if (!shader->attachVertexObject("windlight/atmosphericsFuncs.glsl")) {
- return FALSE;
+ return false;
}
if (!shader->attachVertexObject("windlight/atmosphericsV.glsl"))
{
- return FALSE;
+ return false;
}
}
@@ -161,7 +161,7 @@ BOOL LLShaderMgr::attachShaderFeatures(LLGLSLShader * shader)
{
if (!shader->attachVertexObject("avatar/avatarSkinV.glsl"))
{
- return FALSE;
+ return false;
}
}
@@ -170,13 +170,13 @@ BOOL LLShaderMgr::attachShaderFeatures(LLGLSLShader * shader)
shader->mRiggedVariant = shader;
if (!shader->attachVertexObject("avatar/objectSkinV.glsl"))
{
- return FALSE;
+ return false;
}
}
if (!shader->attachVertexObject("deferred/textureUtilV.glsl"))
{
- return FALSE;
+ return false;
}
///////////////////////////////////////
@@ -188,7 +188,7 @@ BOOL LLShaderMgr::attachShaderFeatures(LLGLSLShader * shader)
{
if (!shader->attachFragmentObject("environment/srgbF.glsl"))
{
- return FALSE;
+ return false;
}
}
@@ -196,7 +196,7 @@ BOOL LLShaderMgr::attachShaderFeatures(LLGLSLShader * shader)
{
if (!shader->attachFragmentObject("windlight/atmosphericsVarsF.glsl"))
{
- return FALSE;
+ return false;
}
}
@@ -204,7 +204,7 @@ BOOL LLShaderMgr::attachShaderFeatures(LLGLSLShader * shader)
{
if (!shader->attachFragmentObject("windlight/atmosphericsHelpersF.glsl"))
{
- return FALSE;
+ return false;
}
}
@@ -213,7 +213,7 @@ BOOL LLShaderMgr::attachShaderFeatures(LLGLSLShader * shader)
{
if (!shader->attachFragmentObject("deferred/deferredUtil.glsl"))
{
- return FALSE;
+ return false;
}
}
@@ -221,7 +221,7 @@ BOOL LLShaderMgr::attachShaderFeatures(LLGLSLShader * shader)
{
if (!shader->attachFragmentObject("deferred/screenSpaceReflUtil.glsl"))
{
- return FALSE;
+ return false;
}
}
@@ -229,7 +229,7 @@ BOOL LLShaderMgr::attachShaderFeatures(LLGLSLShader * shader)
{
if (!shader->attachFragmentObject("deferred/shadowUtil.glsl"))
{
- return FALSE;
+ return false;
}
}
@@ -237,7 +237,7 @@ BOOL LLShaderMgr::attachShaderFeatures(LLGLSLShader * shader)
{
if (!shader->attachFragmentObject("deferred/reflectionProbeF.glsl"))
{
- return FALSE;
+ return false;
}
}
@@ -245,7 +245,7 @@ BOOL LLShaderMgr::attachShaderFeatures(LLGLSLShader * shader)
{
if (!shader->attachFragmentObject("deferred/aoUtil.glsl"))
{
- return FALSE;
+ return false;
}
}
@@ -253,7 +253,7 @@ BOOL LLShaderMgr::attachShaderFeatures(LLGLSLShader * shader)
{
if (!shader->attachFragmentObject("windlight/gammaF.glsl"))
{
- return FALSE;
+ return false;
}
}
@@ -261,19 +261,19 @@ BOOL LLShaderMgr::attachShaderFeatures(LLGLSLShader * shader)
{
if (!shader->attachFragmentObject("environment/encodeNormF.glsl"))
{
- return FALSE;
+ return false;
}
}
if (features->hasAtmospherics || features->isDeferred)
{
if (!shader->attachFragmentObject("windlight/atmosphericsFuncs.glsl")) {
- return FALSE;
+ return false;
}
if (!shader->attachFragmentObject("windlight/atmosphericsF.glsl"))
{
- return FALSE;
+ return false;
}
}
@@ -282,7 +282,7 @@ BOOL LLShaderMgr::attachShaderFeatures(LLGLSLShader * shader)
{
if (!shader->attachFragmentObject("environment/waterFogF.glsl"))
{
- return FALSE;
+ return false;
}
}
@@ -294,14 +294,14 @@ BOOL LLShaderMgr::attachShaderFeatures(LLGLSLShader * shader)
{
if (!shader->attachFragmentObject("lighting/lightAlphaMaskNonIndexedF.glsl"))
{
- return FALSE;
+ return false;
}
}
else
{
if (!shader->attachFragmentObject("lighting/lightNonIndexedF.glsl"))
{
- return FALSE;
+ return false;
}
}
}
@@ -311,14 +311,14 @@ BOOL LLShaderMgr::attachShaderFeatures(LLGLSLShader * shader)
{
if (!shader->attachFragmentObject("lighting/lightAlphaMaskF.glsl"))
{
- return FALSE;
+ return false;
}
}
else
{
if (!shader->attachFragmentObject("lighting/lightF.glsl"))
{
- return FALSE;
+ return false;
}
}
shader->mFeatures.mIndexedTextureChannels = llmax(LLGLSLShader::sIndexedTextureChannels-1, 1);
@@ -329,18 +329,18 @@ BOOL LLShaderMgr::attachShaderFeatures(LLGLSLShader * shader)
{
if (!shader->attachVertexObject("objects/nonindexedTextureV.glsl"))
{
- return FALSE;
+ return false;
}
}
else
{
if (!shader->attachVertexObject("objects/indexedTextureV.glsl"))
{
- return FALSE;
+ return false;
}
}
- return TRUE;
+ return true;
}
//============================================================================
@@ -414,7 +414,7 @@ void LLShaderMgr::dumpShaderSource(U32 shader_code_count, GLchar** shader_code_t
LL_CONT << LL_ENDL;
}
-void LLShaderMgr::dumpObjectLog(GLuint ret, BOOL warns, const std::string& filename)
+void LLShaderMgr::dumpObjectLog(GLuint ret, bool warns, const std::string& filename)
{
std::string log;
log = get_object_log(ret);
@@ -853,7 +853,7 @@ GLuint LLShaderMgr::loadShaderFile(const std::string& filename, S32 & shader_lev
{
//an error occured, print log
LL_WARNS("ShaderLoading") << "GLSL Compilation Error:" << LL_ENDL;
- dumpObjectLog(ret, TRUE, open_file_name);
+ dumpObjectLog(ret, true, open_file_name);
dumpShaderSource(shader_code_count, shader_code_text);
glDeleteShader(ret); //no longer need handle
ret = 0;
@@ -895,7 +895,7 @@ GLuint LLShaderMgr::loadShaderFile(const std::string& filename, S32 & shader_lev
return ret;
}
-BOOL LLShaderMgr::linkProgramObject(GLuint obj, BOOL suppress_errors)
+bool LLShaderMgr::linkProgramObject(GLuint obj, bool suppress_errors)
{
//check for errors
{
@@ -912,7 +912,7 @@ BOOL LLShaderMgr::linkProgramObject(GLuint obj, BOOL suppress_errors)
{
//an error occured, print log
LL_SHADER_LOADING_WARNS() << "GLSL Linker Error:" << LL_ENDL;
- dumpObjectLog(obj, TRUE, "linker");
+ dumpObjectLog(obj, true, "linker");
return success;
}
}
@@ -923,12 +923,12 @@ BOOL LLShaderMgr::linkProgramObject(GLuint obj, BOOL suppress_errors)
{
LL_SHADER_LOADING_WARNS() << "GLSL Linker: Running in Software:" << LL_ENDL;
success = GL_FALSE;
- suppress_errors = FALSE;
+ suppress_errors = false;
}
return success;
}
-BOOL LLShaderMgr::validateProgramObject(GLuint obj)
+bool LLShaderMgr::validateProgramObject(GLuint obj)
{
//check program validity against current GL
glValidateProgram(obj);
@@ -941,7 +941,7 @@ BOOL LLShaderMgr::validateProgramObject(GLuint obj)
}
else
{
- dumpObjectLog(obj, FALSE);
+ dumpObjectLog(obj, false);
}
return success;