/**
- * Called by glReadBuffer to set the source renderbuffer for reading pixels.
+ * Called by glReadBuffer and glNamedFramebufferReadBuffer to set the source
+ * renderbuffer for reading pixels.
* \param mode color buffer such as GL_FRONT, GL_BACK, etc.
*/
-void
-_mesa_read_buffer(struct gl_context *ctx, struct gl_framebuffer *fb,
- GLenum buffer, const char *caller)
+static void
+read_buffer(struct gl_context *ctx, struct gl_framebuffer *fb,
+ GLenum buffer, const char *caller)
{
GLbitfield supportedMask;
gl_buffer_index srcBuffer;
_mesa_ReadBuffer(GLenum buffer)
{
GET_CURRENT_CONTEXT(ctx);
- _mesa_read_buffer(ctx, ctx->ReadBuffer, buffer, "glReadBuffer");
+ read_buffer(ctx, ctx->ReadBuffer, buffer, "glReadBuffer");
}
else
fb = ctx->WinSysReadBuffer;
- _mesa_read_buffer(ctx, fb, src, "glNamedFramebufferReadBuffer");
+ read_buffer(ctx, fb, src, "glNamedFramebufferReadBuffer");
}
_mesa_update_draw_buffers(struct gl_context *ctx);
-extern void
-_mesa_read_buffer(struct gl_context *ctx, struct gl_framebuffer *fb,
- GLenum buffer, const char *caller);
-
extern void GLAPIENTRY
_mesa_ReadBuffer( GLenum mode );