main: Add entry point for NamedFramebufferDrawBuffer.

[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 14:44:43 -08:00
committed by Fredrik Höglund
parent 2f32e4847d
commit 642fb71277
4 changed files with 28 additions and 0 deletions
@@ -187,6 +187,11 @@
<param name="layer" type="GLint" />
</function>
<function name="NamedFramebufferDrawBuffer" 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
@@ -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.
+3
View File
@@ -45,6 +45,9 @@ _mesa_draw_buffer(struct gl_context *ctx, struct gl_framebuffer *fb,
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);
+1
View File
@@ -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 },