mesa: implement glFramebufferTexture
authorJordan Justen <jordan.l.justen@intel.com>
Thu, 18 Apr 2013 17:46:12 +0000 (10:46 -0700)
committerJordan Justen <jordan.l.justen@intel.com>
Wed, 1 May 2013 23:18:25 +0000 (16:18 -0700)
Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
src/mapi/glapi/gen/GL3x.xml
src/mesa/main/fbobject.c
src/mesa/main/fbobject.h

index 9ca3d47a7e9e31ed9dccadb3a9ad91601d21718f..5078f7b6d91ae1820867423399ec3ecbf0ead1b7 100644 (file)
     <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"/>
index de0c08f6d2265eede36a49090a8007f60e9b8ceb..e7da58d43d2fa7b1a4ac2598d1670a7a761bcc42 100644 (file)
@@ -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,
index 5ebbb3538f8f1c62cea3b627b6142fd54ef86e1d..e5d096f0937a04746f604292200bc4cfa72880b5 100644 (file)
@@ -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,