diff options
author | Laura Ekstrand <[email protected]> | 2015-02-06 14:44:43 -0800 |
---|---|---|
committer | Fredrik Höglund <[email protected]> | 2015-05-14 15:48:15 +0200 |
commit | 642fb71277b6e4c5d57ad7a7d6f2d5aae9b746ef (patch) | |
tree | 4b10c520876aaaef7731e0411052a1affc870b66 /src/mesa | |
parent | 2f32e4847d154a9d16869cf03ce66f719d37ec4a (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')
-rw-r--r-- | src/mesa/main/buffers.c | 19 | ||||
-rw-r--r-- | src/mesa/main/buffers.h | 3 | ||||
-rw-r--r-- | src/mesa/main/tests/dispatch_sanity.cpp | 1 |
3 files changed, 23 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. diff --git a/src/mesa/main/buffers.h b/src/mesa/main/buffers.h index 4192afd3f13..12d57430a39 100644 --- a/src/mesa/main/buffers.h +++ b/src/mesa/main/buffers.h @@ -46,6 +46,9 @@ extern void GLAPIENTRY _mesa_DrawBuffer( GLenum mode ); extern void GLAPIENTRY +_mesa_NamedFramebufferDrawBuffer(GLuint framebuffer, GLenum buf); + +extern void GLAPIENTRY _mesa_DrawBuffers(GLsizei n, const GLenum *buffers); extern void diff --git a/src/mesa/main/tests/dispatch_sanity.cpp b/src/mesa/main/tests/dispatch_sanity.cpp index 23ddabd169d..931eeceb212 100644 --- a/src/mesa/main/tests/dispatch_sanity.cpp +++ b/src/mesa/main/tests/dispatch_sanity.cpp @@ -985,6 +985,7 @@ const struct function gl_core_functions_possible[] = { { "glNamedFramebufferParameteri", 45, -1 }, { "glNamedFramebufferTexture", 45, -1 }, { "glNamedFramebufferTextureLayer", 45, -1 }, + { "glNamedFramebufferDrawBuffer", 45, -1 }, { "glInvalidateNamedFramebufferSubData", 45, -1 }, { "glInvalidateNamedFramebufferData", 45, -1 }, { "glClearNamedFramebufferiv", 45, -1 }, |