зеркало из https://github.com/AvaloniaUI/angle.git
Corrects error handling in UseProgram
TRAC #11666 Signed-off-by: Nicolas Capens Signed-off-by: Daniel Koch Author: Shannon Woods git-svn-id: https://angleproject.googlecode.com/svn/trunk@141 736b8ea6-26fd-11df-bfd4-992fa37f6226
This commit is contained in:
Родитель
d1abe5b0ed
Коммит
c847820dc8
|
@ -4268,7 +4268,19 @@ void __stdcall glUseProgram(GLuint program)
|
|||
{
|
||||
gl::Program *programObject = context->getProgram(program);
|
||||
|
||||
if (programObject && !programObject->isLinked())
|
||||
if (!programObject && program != 0)
|
||||
{
|
||||
if (context->getShader(program))
|
||||
{
|
||||
return error(GL_INVALID_OPERATION);
|
||||
}
|
||||
else
|
||||
{
|
||||
return error(GL_INVALID_VALUE);
|
||||
}
|
||||
}
|
||||
|
||||
if (program != 0 && !programObject->isLinked())
|
||||
{
|
||||
return error(GL_INVALID_OPERATION);
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче