summaryrefslogtreecommitdiff
path: root/indra/llrender/llglslshader.cpp
diff options
context:
space:
mode:
authorAnchor Linden <anchor@lindenlab.com>2018-02-28 22:42:23 -0800
committerAnchor Linden <anchor@lindenlab.com>2018-02-28 22:42:23 -0800
commit618179a71722e47115a6b021a1eb2be99e46322f (patch)
tree7cb94aef6fe27ed0497790f07f8c190cf1944f92 /indra/llrender/llglslshader.cpp
parentbfbcd6d16931819c43eea8e83963c9f86c6892dd (diff)
parent5a12a88f7b53bb99a6b302c35d891a8ecee59855 (diff)
Merge
Diffstat (limited to 'indra/llrender/llglslshader.cpp')
-rw-r--r--indra/llrender/llglslshader.cpp34
1 files changed, 17 insertions, 17 deletions
diff --git a/indra/llrender/llglslshader.cpp b/indra/llrender/llglslshader.cpp
index 5d669fb955..970502f2d6 100644
--- a/indra/llrender/llglslshader.cpp
+++ b/indra/llrender/llglslshader.cpp
@@ -408,7 +408,7 @@ BOOL LLGLSLShader::createShader(std::vector<LLStaticHashedString> * attributes,
{
GLhandleARB shaderhandle = LLShaderMgr::instance()->loadShaderFile((*fileIter).first, mShaderLevel, (*fileIter).second, &mDefines, mFeatures.mIndexedTextureChannels);
LL_DEBUGS("ShaderLoading") << "SHADER FILE: " << (*fileIter).first << " mShaderLevel=" << mShaderLevel << LL_ENDL;
- if (shaderhandle > 0)
+ if (shaderhandle)
{
attachObject(shaderhandle);
}
@@ -997,7 +997,7 @@ S32 LLGLSLShader::disableTexture(S32 uniform, LLTexUnit::eTextureType mode)
void LLGLSLShader::uniform1i(U32 index, GLint x)
{
- if (mProgramObject > 0)
+ if (mProgramObject)
{
if (mUniform.size() <= index)
{
@@ -1019,7 +1019,7 @@ void LLGLSLShader::uniform1i(U32 index, GLint x)
void LLGLSLShader::uniform1f(U32 index, GLfloat x)
{
- if (mProgramObject > 0)
+ if (mProgramObject)
{
if (mUniform.size() <= index)
{
@@ -1041,7 +1041,7 @@ void LLGLSLShader::uniform1f(U32 index, GLfloat x)
void LLGLSLShader::uniform2f(U32 index, GLfloat x, GLfloat y)
{
- if (mProgramObject > 0)
+ if (mProgramObject)
{
if (mUniform.size() <= index)
{
@@ -1064,7 +1064,7 @@ void LLGLSLShader::uniform2f(U32 index, GLfloat x, GLfloat y)
void LLGLSLShader::uniform3f(U32 index, GLfloat x, GLfloat y, GLfloat z)
{
- if (mProgramObject > 0)
+ if (mProgramObject)
{
if (mUniform.size() <= index)
{
@@ -1087,7 +1087,7 @@ void LLGLSLShader::uniform3f(U32 index, GLfloat x, GLfloat y, GLfloat z)
void LLGLSLShader::uniform4f(U32 index, GLfloat x, GLfloat y, GLfloat z, GLfloat w)
{
- if (mProgramObject > 0)
+ if (mProgramObject)
{
if (mUniform.size() <= index)
{
@@ -1110,7 +1110,7 @@ void LLGLSLShader::uniform4f(U32 index, GLfloat x, GLfloat y, GLfloat z, GLfloat
void LLGLSLShader::uniform1iv(U32 index, U32 count, const GLint* v)
{
- if (mProgramObject > 0)
+ if (mProgramObject)
{
if (mUniform.size() <= index)
{
@@ -1133,7 +1133,7 @@ void LLGLSLShader::uniform1iv(U32 index, U32 count, const GLint* v)
void LLGLSLShader::uniform1fv(U32 index, U32 count, const GLfloat* v)
{
- if (mProgramObject > 0)
+ if (mProgramObject)
{
if (mUniform.size() <= index)
{
@@ -1156,7 +1156,7 @@ void LLGLSLShader::uniform1fv(U32 index, U32 count, const GLfloat* v)
void LLGLSLShader::uniform2fv(U32 index, U32 count, const GLfloat* v)
{
- if (mProgramObject > 0)
+ if (mProgramObject)
{
if (mUniform.size() <= index)
{
@@ -1179,7 +1179,7 @@ void LLGLSLShader::uniform2fv(U32 index, U32 count, const GLfloat* v)
void LLGLSLShader::uniform3fv(U32 index, U32 count, const GLfloat* v)
{
- if (mProgramObject > 0)
+ if (mProgramObject)
{
if (mUniform.size() <= index)
{
@@ -1202,7 +1202,7 @@ void LLGLSLShader::uniform3fv(U32 index, U32 count, const GLfloat* v)
void LLGLSLShader::uniform4fv(U32 index, U32 count, const GLfloat* v)
{
- if (mProgramObject > 0)
+ if (mProgramObject)
{
if (mUniform.size() <= index)
{
@@ -1225,7 +1225,7 @@ void LLGLSLShader::uniform4fv(U32 index, U32 count, const GLfloat* v)
void LLGLSLShader::uniformMatrix2fv(U32 index, U32 count, GLboolean transpose, const GLfloat *v)
{
- if (mProgramObject > 0)
+ if (mProgramObject)
{
if (mUniform.size() <= index)
{
@@ -1242,7 +1242,7 @@ void LLGLSLShader::uniformMatrix2fv(U32 index, U32 count, GLboolean transpose, c
void LLGLSLShader::uniformMatrix3fv(U32 index, U32 count, GLboolean transpose, const GLfloat *v)
{
- if (mProgramObject > 0)
+ if (mProgramObject)
{
if (mUniform.size() <= index)
{
@@ -1259,7 +1259,7 @@ void LLGLSLShader::uniformMatrix3fv(U32 index, U32 count, GLboolean transpose, c
void LLGLSLShader::uniformMatrix3x4fv(U32 index, U32 count, GLboolean transpose, const GLfloat *v)
{
- if (mProgramObject > 0)
+ if (mProgramObject)
{
if (mUniform.size() <= index)
{
@@ -1276,7 +1276,7 @@ void LLGLSLShader::uniformMatrix3x4fv(U32 index, U32 count, GLboolean transpose,
void LLGLSLShader::uniformMatrix4fv(U32 index, U32 count, GLboolean transpose, const GLfloat *v)
{
- if (mProgramObject > 0)
+ if (mProgramObject)
{
if (mUniform.size() <= index)
{
@@ -1294,7 +1294,7 @@ void LLGLSLShader::uniformMatrix4fv(U32 index, U32 count, GLboolean transpose, c
GLint LLGLSLShader::getUniformLocation(const LLStaticHashedString& uniform)
{
GLint ret = -1;
- if (mProgramObject > 0)
+ if (mProgramObject)
{
LLStaticStringTable<GLint>::iterator iter = mUniformMap.find(uniform);
if (iter != mUniformMap.end())
@@ -1318,7 +1318,7 @@ GLint LLGLSLShader::getUniformLocation(const LLStaticHashedString& uniform)
GLint LLGLSLShader::getUniformLocation(U32 index)
{
GLint ret = -1;
- if (mProgramObject > 0)
+ if (mProgramObject)
{
llassert(index < mUniform.size());
return mUniform[index];