Skip to content

Instantly share code, notes, and snippets.

@podhmo
Created October 4, 2010 08:29
Show Gist options
  • Select an option

  • Save podhmo/609383 to your computer and use it in GitHub Desktop.

Select an option

Save podhmo/609383 to your computer and use it in GitHub Desktop.
(use gl.processing)
(use gl.processing.interactive)
;; animation
(define *angle* 0)
(define draw
(draw$ (lambda ()
(translate 150 150)
(rotate *angle* 0 0 1)
(rect 0 0 40 40))))
(define timer
(timer$ (^ (_) (inc! *angle*) (redisplay))))
;; redisplay=glut-post-redisplay, drawを実行しても良い
(define main
(setup$ (lambda ()
(window 300 300 "sample" 100 100)
(rect-mode! 'center)
(timer 1))
:draw draw))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment