зеркало из https://github.com/AvaloniaUI/angle.git
Fixes incorrect error handling in GetAttribLocation
TRAC #11657 Signed-off-by: Andrew Lewycky Signed-off-by: Daniel Koch Author: Shannon Woods git-svn-id: https://angleproject.googlecode.com/svn/trunk@128 736b8ea6-26fd-11df-bfd4-992fa37f6226
This commit is contained in:
Родитель
d91cfe7e3c
Коммит
bb274c35d5
|
@ -1722,11 +1722,19 @@ int __stdcall glGetAttribLocation(GLuint program, const GLchar* name)
|
|||
|
||||
if (context)
|
||||
{
|
||||
|
||||
gl::Program *programObject = context->getProgram(program);
|
||||
|
||||
if (!programObject)
|
||||
{
|
||||
return error(GL_INVALID_VALUE, -1);
|
||||
if (context->getShader(program))
|
||||
{
|
||||
return error(GL_INVALID_OPERATION, -1);
|
||||
}
|
||||
else
|
||||
{
|
||||
return error(GL_INVALID_VALUE, -1);
|
||||
}
|
||||
}
|
||||
|
||||
return programObject->getAttributeLocation(name);
|
||||
|
|
Загрузка…
Ссылка в новой задаче