main: Add entry point for NamedFramebufferReadBuffer.

[Fredrik: Fix the name of the buf parameter in the XML file]

Reviewed-by: Fredrik Höglund <fredrik@kde.org>
Signed-off-by: Fredrik Höglund <fredrik@kde.org>
This commit is contained in:
Laura Ekstrand
2015-02-06 15:36:52 -08:00
committed by Fredrik Höglund
parent 7518c6b5b2
commit 1f0a5f32d3
4 changed files with 28 additions and 0 deletions
@@ -192,6 +192,11 @@
<param name="buf" type="GLenum" />
</function>
<function name="NamedFramebufferReadBuffer" offset="assign">
<param name="framebuffer" type="GLuint" />
<param name="buf" type="GLenum" />
</function>
<function name="InvalidateNamedFramebufferData" offset="assign">
<param name="framebuffer" type="GLuint" />
<param name="numAttachments" type="GLsizei" />
+19
View File
@@ -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");
}
+3
View File
@@ -71,5 +71,8 @@ _mesa_read_buffer(struct gl_context *ctx, struct gl_framebuffer *fb,
extern void GLAPIENTRY
_mesa_ReadBuffer( GLenum mode );
extern void GLAPIENTRY
_mesa_NamedFramebufferReadBuffer(GLuint framebuffer, GLenum src);
#endif
+1
View File
@@ -986,6 +986,7 @@ const struct function gl_core_functions_possible[] = {
{ "glNamedFramebufferTexture", 45, -1 },
{ "glNamedFramebufferTextureLayer", 45, -1 },
{ "glNamedFramebufferDrawBuffer", 45, -1 },
{ "glNamedFramebufferReadBuffer", 45, -1 },
{ "glInvalidateNamedFramebufferSubData", 45, -1 },
{ "glInvalidateNamedFramebufferData", 45, -1 },
{ "glClearNamedFramebufferiv", 45, -1 },