summaryrefslogtreecommitdiff
path: root/indra/llrender/llglslshader.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llrender/llglslshader.cpp')
-rw-r--r--indra/llrender/llglslshader.cpp46
1 files changed, 23 insertions, 23 deletions
diff --git a/indra/llrender/llglslshader.cpp b/indra/llrender/llglslshader.cpp
index be5ad08fbe..d38857df94 100644
--- a/indra/llrender/llglslshader.cpp
+++ b/indra/llrender/llglslshader.cpp
@@ -81,7 +81,7 @@ const std::string gShaderConstsVal[LLGLSLShader::NUM_SHADER_CONSTS] =
};
-BOOL shouldChange(const LLVector4& v1, const LLVector4& v2)
+bool shouldChange(const LLVector4& v1, const LLVector4& v2)
{
return v1 != v2;
}
@@ -309,7 +309,7 @@ LLGLSLShader::LLGLSLShader()
mShaderLevel(0),
mShaderGroup(SG_DEFAULT),
mFeatures(),
- mUniformsDirty(FALSE),
+ mUniformsDirty(false),
mTimerQuery(0),
mSamplesQuery(0),
mPrimitivesQuery(0)
@@ -381,7 +381,7 @@ void LLGLSLShader::unloadInternal()
stop_glerror();
}
-BOOL LLGLSLShader::createShader(std::vector<LLStaticHashedString>* attributes,
+bool LLGLSLShader::createShader(std::vector<LLStaticHashedString>* attributes,
std::vector<LLStaticHashedString>* uniforms,
U32 varying_count,
const char** varyings)
@@ -415,10 +415,10 @@ BOOL LLGLSLShader::createShader(std::vector<LLStaticHashedString>* attributes,
// Shouldn't happen if shader related extensions, like ARB_vertex_shader, exist.
LL_SHADER_LOADING_WARNS() << "Failed to create handle for shader: " << mName << LL_ENDL;
unloadInternal();
- return FALSE;
+ return false;
}
- BOOL success = TRUE;
+ bool success = true;
mUsingBinaryProgram = LLShaderMgr::instance()->loadCachedProgramBinary(this);
@@ -440,7 +440,7 @@ BOOL LLGLSLShader::createShader(std::vector<LLStaticHashedString>* attributes,
}
else
{
- success = FALSE;
+ success = false;
}
}
}
@@ -449,7 +449,7 @@ BOOL LLGLSLShader::createShader(std::vector<LLStaticHashedString>* attributes,
if (!LLShaderMgr::instance()->attachShaderFeatures(this))
{
unloadInternal();
- return FALSE;
+ return false;
}
// Map attributes and uniforms
if (success)
@@ -529,7 +529,7 @@ void dumpAttachObject(const char* func_name, GLuint program_object, const std::s
}
#endif // DEBUG_SHADER_INCLUDES
-BOOL LLGLSLShader::attachVertexObject(std::string object_path)
+bool LLGLSLShader::attachVertexObject(std::string object_path)
{
if (LLShaderMgr::instance()->mVertexShaderObjects.count(object_path) > 0)
{
@@ -539,19 +539,19 @@ BOOL LLGLSLShader::attachVertexObject(std::string object_path)
dumpAttachObject("attachVertexObject", mProgramObject, object_path);
#endif // DEBUG_SHADER_INCLUDES
stop_glerror();
- return TRUE;
+ return true;
}
else
{
LL_SHADER_LOADING_WARNS() << "Attempting to attach shader object: '" << object_path << "' that hasn't been compiled." << LL_ENDL;
- return FALSE;
+ return false;
}
}
-BOOL LLGLSLShader::attachFragmentObject(std::string object_path)
+bool LLGLSLShader::attachFragmentObject(std::string object_path)
{
if(mUsingBinaryProgram)
- return TRUE;
+ return true;
if (LLShaderMgr::instance()->mFragmentShaderObjects.count(object_path) > 0)
{
@@ -561,12 +561,12 @@ BOOL LLGLSLShader::attachFragmentObject(std::string object_path)
dumpAttachObject("attachFragmentObject", mProgramObject, object_path);
#endif // DEBUG_SHADER_INCLUDES
stop_glerror();
- return TRUE;
+ return true;
}
else
{
LL_SHADER_LOADING_WARNS() << "Attempting to attach shader object: '" << object_path << "' that hasn't been compiled." << LL_ENDL;
- return FALSE;
+ return false;
}
}
@@ -602,11 +602,11 @@ void LLGLSLShader::attachObjects(GLuint* objects, S32 count)
}
}
-BOOL LLGLSLShader::mapAttributes(const std::vector<LLStaticHashedString>* attributes)
+bool LLGLSLShader::mapAttributes(const std::vector<LLStaticHashedString>* attributes)
{
LL_PROFILE_ZONE_SCOPED_CATEGORY_SHADER;
- BOOL res = TRUE;
+ bool res = true;
if (!mUsingBinaryProgram)
{
//before linking, make sure reserved attributes always have consistent locations
@@ -663,10 +663,10 @@ BOOL LLGLSLShader::mapAttributes(const std::vector<LLStaticHashedString>* attrib
}
}
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
void LLGLSLShader::mapUniform(GLint index, const vector<LLStaticHashedString>* uniforms)
@@ -830,11 +830,11 @@ GLint LLGLSLShader::mapUniformTextureChannel(GLint location, GLenum type, GLint
return -1;
}
-BOOL LLGLSLShader::mapUniforms(const vector<LLStaticHashedString>* uniforms)
+bool LLGLSLShader::mapUniforms(const vector<LLStaticHashedString>* uniforms)
{
LL_PROFILE_ZONE_SCOPED_CATEGORY_SHADER;
- BOOL res = TRUE;
+ bool res = true;
mTotalUniformSize = 0;
mActiveTextureChannels = 0;
@@ -1001,11 +1001,11 @@ BOOL LLGLSLShader::mapUniforms(const vector<LLStaticHashedString>* uniforms)
}
-BOOL LLGLSLShader::link(BOOL suppress_errors)
+bool LLGLSLShader::link(bool suppress_errors)
{
LL_PROFILE_ZONE_SCOPED_CATEGORY_SHADER;
- BOOL success = LLShaderMgr::instance()->linkProgramObject(mProgramObject, suppress_errors);
+ bool success = LLShaderMgr::instance()->linkProgramObject(mProgramObject, suppress_errors);
if (!success && !suppress_errors)
{
@@ -1045,7 +1045,7 @@ void LLGLSLShader::bind()
if (mUniformsDirty)
{
LLShaderMgr::instance()->updateShaderUniforms(this);
- mUniformsDirty = FALSE;
+ mUniformsDirty = false;
}
}