summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/buffers.c
diff options
context:
space:
mode:
authorLaura Ekstrand <[email protected]>2015-02-06 14:44:43 -0800
committerFredrik Höglund <[email protected]>2015-05-14 15:48:15 +0200
commit642fb71277b6e4c5d57ad7a7d6f2d5aae9b746ef (patch)
tree4b10c520876aaaef7731e0411052a1affc870b66 /src/mesa/main/buffers.c
parent2f32e4847d154a9d16869cf03ce66f719d37ec4a (diff)
main: Add entry point for NamedFramebufferDrawBuffer.
[Fredrik: Fix the name of the buf parameter in the XML file] Reviewed-by: Fredrik Höglund <[email protected]> Signed-off-by: Fredrik Höglund <[email protected]>
Diffstat (limited to 'src/mesa/main/buffers.c')
-rw-r--r--src/mesa/main/buffers.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/mesa/main/buffers.c b/src/mesa/main/buffers.c
index 8b52a5392a8..9b66e38b1e1 100644
--- a/src/mesa/main/buffers.c
+++ b/src/mesa/main/buffers.c
@@ -297,6 +297,25 @@ _mesa_DrawBuffer(GLenum buffer)
}
+void GLAPIENTRY
+_mesa_NamedFramebufferDrawBuffer(GLuint framebuffer, GLenum buf)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ struct gl_framebuffer *fb;
+
+ if (framebuffer) {
+ fb = _mesa_lookup_framebuffer_err(ctx, framebuffer,
+ "glNamedFramebufferDrawBuffer");
+ if (!fb)
+ return;
+ }
+ else
+ fb = ctx->WinSysDrawBuffer;
+
+ _mesa_draw_buffer(ctx, fb, buf, "glNamedFramebufferDrawBuffer");
+}
+
+
/**
* Called by glDrawBuffersARB; specifies the destination color renderbuffers
* for N fragment program color outputs.