From 9de7a81626304dae5ced4e202a820e353f8fc1e9 Mon Sep 17 00:00:00 2001 From: Laura Ekstrand Date: Mon, 9 Feb 2015 14:08:00 -0800 Subject: main: Add entry point for NamedFramebufferDrawBuffers. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Reviewed-by: Fredrik Höglund Signed-off-by: Fredrik Höglund --- src/mesa/main/buffers.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'src/mesa/main/buffers.c') diff --git a/src/mesa/main/buffers.c b/src/mesa/main/buffers.c index 0c6d379309f..0536266d756 100644 --- a/src/mesa/main/buffers.c +++ b/src/mesa/main/buffers.c @@ -506,6 +506,26 @@ _mesa_DrawBuffers(GLsizei n, const GLenum *buffers) } +void GLAPIENTRY +_mesa_NamedFramebufferDrawBuffers(GLuint framebuffer, GLsizei n, + const GLenum *bufs) +{ + GET_CURRENT_CONTEXT(ctx); + struct gl_framebuffer *fb; + + if (framebuffer) { + fb = _mesa_lookup_framebuffer_err(ctx, framebuffer, + "glNamedFramebufferDrawBuffers"); + if (!fb) + return; + } + else + fb = ctx->WinSysDrawBuffer; + + _mesa_draw_buffers(ctx, fb, n, bufs, "glNamedFramebufferDrawBuffers"); +} + + /** * Performs necessary state updates when _mesa_drawbuffers makes an * actual change. -- cgit v1.2.3