summaryrefslogtreecommitdiffstats
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
parent5da8288911bfd104756dfe6dc02be998208dd4cb (diff)
mesa: implement glFramebufferTexture
Signed-off-by: Jordan Justen <[email protected]> Reviewed-by: Brian Paul <[email protected]>
-rw-r--r--src/mapi/glapi/gen/GL3x.xml2
-rw-r--r--src/mesa/main/fbobject.c16
-rw-r--r--src/mesa/main/fbobject.h4
3 files changed, 21 insertions, 1 deletions
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 @@
<param name="params" type="GLint64 *"/>
</function>
- <function name="FramebufferTexture" offset="assign" exec="skip">
+ <function name="FramebufferTexture" offset="assign">
<param name="target" type="GLenum"/>
<param name="attachment" type="GLenum"/>
<param name="texture" type="GLuint"/>
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);