Skip to content

Instantly share code, notes, and snippets.

@taktoa
Created September 19, 2014 02:16
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 taktoa/ac6c782f6ead6dbd73a9 to your computer and use it in GitHub Desktop.
Save taktoa/ac6c782f6ead6dbd73a9 to your computer and use it in GitHub Desktop.
test-gl.rkt
#lang racket
(require
racket/gui
sgl)
(define c%
(class canvas%
(inherit refresh with-gl-context swap-gl-buffers)
(super-new)
(define/override (on-paint)
(with-gl-context
(lambda ()
(gl-push-matrix)
(gl-color 0 0 1)
(gl-rect 0 0 1 1)
(gl-pop-matrix)
(swap-gl-buffers)
(gl-flush))))
(refresh)))
(module+ main
(define f (new frame%
[style '(no-resize-border
no-caption)]
[label "glui"]
[width 1280]
[height 1024]))
(define c (new c%
[parent f]
[style '(gl)]))
(send f show #t)
(send f center 'both))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment