Fixes error handling in BindAttribLocation

TRAC #11661 Signed-off-by: Andrew Lewycky Signed-off-by: Daniel Koch Author: Shannon Woods git-svn-id: https://angleproject.googlecode.com/svn/trunk@131 736b8ea6-26fd-11df-bfd4-992fa37f6226
parent cf4aa879
...@@ -120,7 +120,19 @@ void __stdcall glBindAttribLocation(GLuint program, GLuint index, const GLchar* ...@@ -120,7 +120,19 @@ void __stdcall glBindAttribLocation(GLuint program, GLuint index, const GLchar*
if (!programObject) if (!programObject)
{ {
return error(GL_INVALID_VALUE); if (context->getShader(program))
{
return error(GL_INVALID_OPERATION);
}
else
{
return error(GL_INVALID_VALUE);
}
}
if (strncmp(name, "gl_", 3) == 0)
{
return error(GL_INVALID_OPERATION);
} }
programObject->bindAttributeLocation(index, name); programObject->bindAttributeLocation(index, name);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment