Commit 75baa2bf authored by Robert Menzel's avatar Robert Menzel
Browse files

remerged fix from branch refactorOpenGLObjects

parent b3cd03fc
...@@ -17,8 +17,10 @@ void ShaderProgramObject::use(void) const ...@@ -17,8 +17,10 @@ void ShaderProgramObject::use(void) const
void ShaderProgramObject::updateUniforms(void) const void ShaderProgramObject::updateUniforms(void) const
{ {
for(UniformAttachmentVec::size_type i = 0; i < mUniformAttachments.size(); ++i) for(UniformAttachmentVec::size_type i = 0; i < mUniformAttachments.size(); ++i)
mUniformAttachments[i].uniform->apply(mUniformAttachments[i].location); if(mUniformAttachments[i].location != -1)
mUniformAttachments[i].uniform->apply(mUniformAttachments[i].location);
for(UniformTextureAttachmentVec::size_type i = 0; i < mUniformTextureAttachments.size(); ++i) for(UniformTextureAttachmentVec::size_type i = 0; i < mUniformTextureAttachments.size(); ++i)
mUniformTextureAttachments[i].uniformTexture->apply(mUniformTextureAttachments[i].location, i); if(mUniformTextureAttachments[i].location != -1)
mUniformTextureAttachments[i].uniformTexture->apply(mUniformTextureAttachments[i].location, i);
} }
Supports Markdown
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