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:
committed by
Fredrik Höglund
parent
2f32e4847d
commit
642fb71277
@@ -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" />
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
@@ -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 },
|
||||
|
||||
Reference in New Issue
Block a user