From 02f2bce08de5c8430a800860ffbee71d2b4f57fc Mon Sep 17 00:00:00 2001 From: Jordan Justen Date: Thu, 18 Apr 2013 10:46:12 -0700 Subject: mesa: implement glFramebufferTexture Signed-off-by: Jordan Justen Reviewed-by: Brian Paul --- src/mapi/glapi/gen/GL3x.xml | 2 +- src/mesa/main/fbobject.c | 16 ++++++++++++++++ src/mesa/main/fbobject.h | 4 ++++ 3 files changed, 21 insertions(+), 1 deletion(-) diff --git a/src/mapi/glapi/gen/GL3x.xml b/src/mapi/glapi/gen/GL3x.xml index 9ca3d47a7e9..5078f7b6d91 100644 --- a/src/mapi/glapi/gen/GL3x.xml +++ b/src/mapi/glapi/gen/GL3x.xml @@ -607,7 +607,7 @@ - + diff --git a/src/mesa/main/fbobject.c b/src/mesa/main/fbobject.c index de0c08f6d22..e7da58d43d2 100644 --- a/src/mesa/main/fbobject.c +++ b/src/mesa/main/fbobject.c @@ -2402,6 +2402,22 @@ _mesa_FramebufferTextureLayer(GLenum target, GLenum attachment, } +void GLAPIENTRY +_mesa_FramebufferTexture(GLenum target, GLenum attachment, + GLuint texture, GLint level) +{ + GET_CURRENT_CONTEXT(ctx); + + if (ctx->Version >= 32 || ctx->Extensions.ARB_geometry_shader4) { + framebuffer_texture(ctx, "Layer", target, attachment, 0, texture, + level, 0, GL_TRUE); + } else { + _mesa_error(ctx, GL_INVALID_OPERATION, + "unsupported function (glFramebufferTexture) called"); + } +} + + void GLAPIENTRY _mesa_FramebufferRenderbuffer(GLenum target, GLenum attachment, GLenum renderbufferTarget, diff --git a/src/mesa/main/fbobject.h b/src/mesa/main/fbobject.h index 5ebbb3538f8..e5d096f0937 100644 --- a/src/mesa/main/fbobject.h +++ b/src/mesa/main/fbobject.h @@ -192,6 +192,10 @@ extern void GLAPIENTRY _mesa_FramebufferTextureLayer(GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer); +extern void GLAPIENTRY +_mesa_FramebufferTexture(GLenum target, GLenum attachment, + GLuint texture, GLint level); + extern void GLAPIENTRY _mesa_FramebufferRenderbuffer(GLenum target, GLenum attachment, GLenum renderbuffertarget, -- cgit v1.2.3