Commit 0c598a27 authored by Rye Mutt's avatar Rye Mutt 🍞
Browse files

Small cleanup to failed shader unloading

parent 7297e0cc
......@@ -436,6 +436,7 @@ BOOL LLGLSLShader::createShader(std::vector<LLStaticHashedString> * attributes,
// Attach existing objects
if (!LLShaderMgr::instance()->attachShaderFeatures(this))
{
unloadInternal();
return FALSE;
}
......@@ -456,6 +457,8 @@ BOOL LLGLSLShader::createShader(std::vector<LLStaticHashedString> * attributes,
}
if( !success )
{
unloadInternal();
LL_SHADER_LOADING_WARNS() << "Failed to link shader: " << mName << LL_ENDL;
// Try again using a lower shader level;
......@@ -1511,13 +1514,6 @@ void LLGLSLShader::vertexAttrib4f(U32 index, GLfloat x, GLfloat y, GLfloat z, GL
}
}
void LLGLSLShader::vertexAttrib4fv(U32 index, GLfloat* v)
{
if (mAttribute[index] > 0)
{
glVertexAttrib4fv(mAttribute[index], v);
}
}
void LLGLSLShader::setMinimumAlpha(F32 minimum)
{
......
......@@ -146,7 +146,6 @@ class LLGLSLShader
void setMinimumAlpha(F32 minimum);
void vertexAttrib4f(U32 index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
void vertexAttrib4fv(U32 index, GLfloat* v);
//GLint getUniformLocation(const std::string& uniform);
GLint getUniformLocation(const LLStaticHashedString& uniform);
......@@ -163,7 +162,7 @@ class LLGLSLShader
void addPermutation(std::string name, std::string value);
void removePermutations(std::map<std::string, std::string>& map)
{
for (auto entry : map)
for (const auto& entry : map)
{
mDefines.erase(entry.first);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment