Merge pull request #9931 from dabingnn/v3_fixGL_Invalid_value

refresh attributes and uniforms in glprogramstate
This commit is contained in:
minggo 2015-01-12 19:33:04 +08:00
commit 731e6b179d
1 changed files with 2 additions and 0 deletions

View File

@ -375,6 +375,7 @@ void GLProgramState::applyAttributes(bool applyAttribFlags)
{
// Don't set attributes if they weren't set
// Use Case: Auto-batching
updateUniformsAndAttributes();
if(_vertexAttribsFlags) {
// enable/disable vertex attribs
if (applyAttribFlags)
@ -389,6 +390,7 @@ void GLProgramState::applyAttributes(bool applyAttribFlags)
void GLProgramState::applyUniforms()
{
// set uniforms
updateUniformsAndAttributes();
for(auto& uniform : _uniforms) {
uniform.second.apply();
}