GLProgram::link always check link status

Fix issues #16231
This commit is contained in:
Vladimir Perminov 2016-07-27 15:31:32 +03:00
parent 3a14388087
commit 3734668d17
1 changed files with 7 additions and 7 deletions

View File

@ -565,12 +565,6 @@ bool GLProgram::link()
glLinkProgram(_program);
parseVertexAttribs();
parseUniforms();
clearShader();
#if DEBUG || (CC_TARGET_PLATFORM == CC_PLATFORM_WINRT)
glGetProgramiv(_program, GL_LINK_STATUS, &status);
if (status == GL_FALSE)
@ -579,7 +573,13 @@ bool GLProgram::link()
GL::deleteProgram(_program);
_program = 0;
}
#endif
else
{
parseVertexAttribs();
parseUniforms();
clearShader();
}
return (status == GL_TRUE);
}