GLuint first;
GLint i;
- if (n < 0) {
- _mesa_error(ctx, GL_INVALID_VALUE, "%s(n<0)", func);
- return;
- }
-
if (!renderbuffers)
return;
}
+static void
+create_render_buffers_err(struct gl_context *ctx, GLsizei n,
+ GLuint *renderbuffers, bool dsa)
+{
+ const char *func = dsa ? "glCreateRenderbuffers" : "glGenRenderbuffers";
+
+ if (n < 0) {
+ _mesa_error(ctx, GL_INVALID_VALUE, "%s(n<0)", func);
+ return;
+ }
+
+ create_render_buffers(ctx, n, renderbuffers, dsa);
+}
+
+
void GLAPIENTRY
_mesa_GenRenderbuffers(GLsizei n, GLuint *renderbuffers)
{
GET_CURRENT_CONTEXT(ctx);
- create_render_buffers(ctx, n, renderbuffers, false);
+ create_render_buffers_err(ctx, n, renderbuffers, false);
}
_mesa_CreateRenderbuffers(GLsizei n, GLuint *renderbuffers)
{
GET_CURRENT_CONTEXT(ctx);
- create_render_buffers(ctx, n, renderbuffers, true);
+ create_render_buffers_err(ctx, n, renderbuffers, true);
}