mirror of https://github.com/axmolengine/axmol.git
Merge pull request #9931 from dabingnn/v3_fixGL_Invalid_value
refresh attributes and uniforms in glprogramstate
This commit is contained in:
commit
731e6b179d
|
@ -375,6 +375,7 @@ void GLProgramState::applyAttributes(bool applyAttribFlags)
|
||||||
{
|
{
|
||||||
// Don't set attributes if they weren't set
|
// Don't set attributes if they weren't set
|
||||||
// Use Case: Auto-batching
|
// Use Case: Auto-batching
|
||||||
|
updateUniformsAndAttributes();
|
||||||
if(_vertexAttribsFlags) {
|
if(_vertexAttribsFlags) {
|
||||||
// enable/disable vertex attribs
|
// enable/disable vertex attribs
|
||||||
if (applyAttribFlags)
|
if (applyAttribFlags)
|
||||||
|
@ -389,6 +390,7 @@ void GLProgramState::applyAttributes(bool applyAttribFlags)
|
||||||
void GLProgramState::applyUniforms()
|
void GLProgramState::applyUniforms()
|
||||||
{
|
{
|
||||||
// set uniforms
|
// set uniforms
|
||||||
|
updateUniformsAndAttributes();
|
||||||
for(auto& uniform : _uniforms) {
|
for(auto& uniform : _uniforms) {
|
||||||
uniform.second.apply();
|
uniform.second.apply();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue