lib/glesv2: wrap glFramebufferRenderbuffer and GLAttachment
authorAlexis Laferrière <alexis.laf@xymus.net>
Sat, 12 Sep 2015 12:53:50 +0000 (08:53 -0400)
committerAlexis Laferrière <alexis.laf@xymus.net>
Mon, 14 Sep 2015 18:00:38 +0000 (14:00 -0400)
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>

lib/glesv2/glesv2.nit

index 8027255..9203efd 100644 (file)
@@ -458,6 +458,27 @@ class GLCap
        redef fun hash do return val
        redef fun ==(o) do return o != null and is_same_type(o) and o.hash == self.hash
 end
+
+# Attach a renderbuffer object to a framebuffer object
+fun glFramebufferRenderbuffer(target: GLFramebufferTarget, attachment: GLAttachment,
+                              renderbuffertarget: GLRenderbufferTarget, renderbuffer: Int) `{
+       glFramebufferRenderbuffer(target, attachment, renderbuffertarget, renderbuffer);
+`}
+
+# Renderbuffer attachment point to a framebuffer
+extern class GLAttachment
+       super GLEnum
+end
+
+# First color attachment point
+fun gl_COLOR_ATTACHMENT0: GLAttachment `{ return GL_COLOR_ATTACHMENT0; `}
+
+# Depth attachment point
+fun gl_DEPTH_ATTACHMENT: GLAttachment `{ return GL_DEPTH_ATTACHMENT; `}
+
+# Stencil attachment
+fun gl_STENCIL_ATTACHMENT: GLAttachment `{ return GL_STENCIL_ATTACHMENT; `}
+
 redef class Sys
        private var gles = new GLES is lazy
 end