Skip to content

Instantly share code, notes, and snippets.

@Madsy
Last active December 28, 2015 02:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Madsy/7427888 to your computer and use it in GitHub Desktop.
Save Madsy/7427888 to your computer and use it in GitHub Desktop.
(define
color-attachment
(texture-create
#:target 'texture-2d
#:num-channels 4
#:format 'fixedpoint
#:width 640
#:height 360))
(define
depth-attachment
(texture-create
#:target 'texture-2d
#:num-channels 1
#:format 'depth
#:width 640
#:height 360))
(define fb (framebuffer-create))
(define show-frame
(lambda ()
(framebuffer-attach-texture fb color-attachment)
(framebuffer-attach-texture fb depth-attachment)
(framebuffer-bind fb)
(gl-clear-color 0.0 1.0 0.0 1.0)
(gl-clear)
(framebuffer-flip fb)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment