GLuint first;
GLint i;
- if (MESA_VERBOSE & (VERBOSE_API|VERBOSE_TEXTURE))
- _mesa_debug(ctx, "%s %d\n", caller, n);
-
- if (n < 0) {
- _mesa_error(ctx, GL_INVALID_VALUE, "%s(n < 0)", caller);
- return;
- }
-
if (!textures)
return;
_mesa_HashUnlockMutex(ctx->Shared->TexObjects);
}
+
+static void
+create_textures_err(struct gl_context *ctx, GLenum target,
+ GLsizei n, GLuint *textures, const char *caller)
+{
+ if (MESA_VERBOSE & (VERBOSE_API|VERBOSE_TEXTURE))
+ _mesa_debug(ctx, "%s %d\n", caller, n);
+
+ if (n < 0) {
+ _mesa_error(ctx, GL_INVALID_VALUE, "%s(n < 0)", caller);
+ return;
+ }
+
+ create_textures(ctx, target, n, textures, caller);
+}
+
/*@}*/
_mesa_GenTextures(GLsizei n, GLuint *textures)
{
GET_CURRENT_CONTEXT(ctx);
- create_textures(ctx, 0, n, textures, "glGenTextures");
+ create_textures_err(ctx, 0, n, textures, "glGenTextures");
}
/**
return;
}
- create_textures(ctx, target, n, textures, "glCreateTextures");
+ create_textures_err(ctx, target, n, textures, "glCreateTextures");
}
/**