Last active
December 28, 2015 02:29
-
-
Save Madsy/7427888 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(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