main: glDeleteTextures now throws GL_INVALID_VALUE if n is negative.
This is in conformance with the OpenGL spec. Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
This commit is contained in:
@@ -1403,6 +1403,11 @@ _mesa_DeleteTextures( GLsizei n, const GLuint *textures)
|
||||
|
||||
FLUSH_VERTICES(ctx, 0); /* too complex */
|
||||
|
||||
if (n < 0) {
|
||||
_mesa_error(ctx, GL_INVALID_VALUE, "glDeleteTextures(n)");
|
||||
return;
|
||||
}
|
||||
|
||||
if (!textures)
|
||||
return;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user