summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Thompson <dthompson2@worcester.edu>2014-10-28 19:53:30 -0400
committerDavid Thompson <dthompson2@worcester.edu>2014-10-28 19:53:30 -0400
commit6dbafc2f271415cae39442e17f73a51747de439e (patch)
treed482bcfeb660d29c9b72995af7422e500066a361
parent1c319e11e4fe69a3c1fd0df511ced3458a0084c0 (diff)
gl: Add wrappers for framebuffer/renderbuffer functions.
* sly/wrappers/gl.scm (glGenFramebuffers, glDeleteFramebuffers, glBindFramebuffer, glFramebufferTexture2D, glCheckFramebufferStatus, glGenRenderbuffers, glDeleteRenderbuffers, glBindRenderbuffer, glRenderbufferStorage, glFramebufferRenderbuffer): New procedures.
-rw-r--r--sly/wrappers/gl.scm73
1 files changed, 73 insertions, 0 deletions
diff --git a/sly/wrappers/gl.scm b/sly/wrappers/gl.scm
index 66b08cf..2d251dc 100644
--- a/sly/wrappers/gl.scm
+++ b/sly/wrappers/gl.scm
@@ -141,3 +141,76 @@ instanced rendering.")
(gl-disable-client-state state)))
(export with-gl-client-state)
+
+;;;
+;;; Framebuffers
+;;;
+
+(define-gl-procedure (glGenFramebuffers (n GLsizei)
+ (ids GLuint-*)
+ -> void)
+ "Generate framebuffer object names.")
+
+(define-gl-procedure (glDeleteFramebuffers (n GLsizei)
+ (framebuffers GLuint-*)
+ -> void)
+ "Delete framebuffer objects.")
+
+(define-gl-procedure (glBindFramebuffer (target GLenum)
+ (framebuffer GLuint)
+ -> void)
+ "Bind a framebuffer to a framebuffer target.")
+
+(define-gl-procedure (glFramebufferTexture2D (target GLenum)
+ (attachment GLenum)
+ (textarget GLenum)
+ (texture GLuint)
+ (level GLint)
+ -> void)
+ "Attach a level of a texture object as a logical buffer to the
+currently bound framebuffer object.")
+
+(define-gl-procedure (glCheckFramebufferStatus (target GLenum)
+ -> GLenum)
+ "Return the framebuffer completeness status of a framebuffer
+object.")
+
+(define-gl-procedure (glGenRenderbuffers (n GLsizei)
+ (ids GLuint-*)
+ -> void)
+ "Generate renderbuffer object names.")
+
+(define-gl-procedure (glDeleteRenderbuffers (n GLsizei)
+ (renderbuffers GLuint-*)
+ -> void)
+ "Delete renderbuffer objects.")
+
+(define-gl-procedure (glBindRenderbuffer (target GLenum)
+ (renderbuffer GLuint)
+ -> void)
+ "Bind a named renderbuffer object.")
+
+(define-gl-procedure (glRenderbufferStorage (target GLenum)
+ (internalformat GLenum)
+ (width GLsizei)
+ (height GLsizei)
+ -> void)
+ "Create and initialize a renderbuffer object's data store.")
+
+(define-gl-procedure (glFramebufferRenderbuffer (target GLenum)
+ (attachment GLenum)
+ (renderbuffertarget GLenum)
+ (renderbuffer GLuint)
+ -> void)
+ "Attach a renderbuffer object to a framebuffer object.")
+
+(export glGenFramebuffers
+ glDeleteFramebuffers
+ glBindFramebuffer
+ glFramebufferTexture2D
+ glCheckFramebufferStatus
+ glGenRenderbuffers
+ glDeleteRenderbuffers
+ glBindRenderbuffer
+ glRenderbufferStorage
+ glFramebufferRenderbuffer)