summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/buffers.c
diff options
context:
space:
mode:
authorLaura Ekstrand <[email protected]>2015-02-06 15:36:52 -0800
committerFredrik Höglund <[email protected]>2015-05-14 15:48:15 +0200
commit1f0a5f32d328e54483dd623ad09bd3f6b119f7a6 (patch)
tree6f76c8a2d9b77b9ef815b087efa6e98e0482d29f /src/mesa/main/buffers.c
parent7518c6b5b2ae8b2a6e931d4be1d5976d553983a0 (diff)
main: Add entry point for NamedFramebufferReadBuffer.
[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 e1d1bafc367..d9979ad9ed5 100644
--- a/src/mesa/main/buffers.c
+++ b/src/mesa/main/buffers.c
@@ -697,3 +697,22 @@ _mesa_ReadBuffer(GLenum buffer)
GET_CURRENT_CONTEXT(ctx);
_mesa_read_buffer(ctx, ctx->ReadBuffer, buffer, "glReadBuffer");
}
+
+
+void GLAPIENTRY
+_mesa_NamedFramebufferReadBuffer(GLuint framebuffer, GLenum src)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ struct gl_framebuffer *fb;
+
+ if (framebuffer) {
+ fb = _mesa_lookup_framebuffer_err(ctx, framebuffer,
+ "glNamedFramebufferReadBuffer");
+ if (!fb)
+ return;
+ }
+ else
+ fb = ctx->WinSysReadBuffer;
+
+ _mesa_read_buffer(ctx, fb, src, "glNamedFramebufferReadBuffer");
+}