summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
authorJordan Justen <[email protected]>2013-04-18 10:46:12 -0700
committerJordan Justen <[email protected]>2013-05-01 16:18:25 -0700
commit02f2bce08de5c8430a800860ffbee71d2b4f57fc (patch)
tree9dddf5c5e4e329a5e0b6d72b585c17ffc05d235d /src/mesa
parent5da8288911bfd104756dfe6dc02be998208dd4cb (diff)
mesa: implement glFramebufferTexture
Signed-off-by: Jordan Justen <[email protected]> Reviewed-by: Brian Paul <[email protected]>
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/main/fbobject.c16
-rw-r--r--src/mesa/main/fbobject.h4
2 files changed, 20 insertions, 0 deletions
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
@@ -2403,6 +2403,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,
GLuint renderbuffer)
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
@@ -193,6 +193,10 @@ _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,
GLuint renderbuffer);