Mesa (master): mesa: implement glFramebufferTexture
Jordan Justen
jljusten at kemper.freedesktop.org
Wed May 1 23:30:27 UTC 2013
Module: Mesa
Branch: master
Commit: 02f2bce08de5c8430a800860ffbee71d2b4f57fc
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=02f2bce08de5c8430a800860ffbee71d2b4f57fc
Author: Jordan Justen <jordan.l.justen at intel.com>
Date: Thu Apr 18 10:46:12 2013 -0700
mesa: implement glFramebufferTexture
Signed-off-by: Jordan Justen <jordan.l.justen at intel.com>
Reviewed-by: Brian Paul <brianp at vmware.com>
---
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 deletions(-)
diff --git a/src/mapi/glapi/gen/GL3x.xml b/src/mapi/glapi/gen/GL3x.xml
index 9ca3d47..5078f7b 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 de0c08f..e7da58d 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 5ebbb35..e5d096f 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);
More information about the mesa-commit
mailing list