Index: schemengine.scm ================================================================== --- schemengine.scm +++ schemengine.scm @@ -98,15 +98,15 @@ ;; -------------------------------------------------------------------------------------------- ;; (GRAPH:SETUP settings) ;; Setup the OpenGL subsystem. ;; -------------------------------------------------------------------------------------------- - [define (graph:setup settings) - (let ( [on-init (at settings 'on-init: (lambda () #t))] - [on-resize (at settings 'on-resize: (lambda (width height) #t))] - [on-draw (at settings 'on-draw: (lambda () #t))] - [on-update (at settings 'on-update: (lambda (time) #t))]) + [define (graph:setup settings callbacks) + (let ( [on-init (at callbacks 'on-init: (lambda () #t))] + [on-resize (at callbacks 'on-resize: (lambda (width height) #t))] + [on-draw (at callbacks 'on-draw: (lambda () #t))] + [on-update (at callbacks 'on-update: (lambda (time) #t))]) (glut:InitDisplayMode (+ glut:RGBA glut:DEPTH glut:DOUBLE)) (glut:CreateWindow (at settings 'title: "SchemEnginE v1.0")) (if (at settings 'fullscreen:) (glut:FullScreen)) (glut:ReshapeFunc [lambda (width height) (graph:on-resize on-resize width height)]) (glut:IdleFunc [lambda () (graph:on-idle on-update)]) @@ -135,9 +135,9 @@ ;; -------------------------------------------------------------------------------------------- ;; (APPLICATION settings) ;; Apply SETTINGS (configure system and set callbacks) and start the application). ;; -------------------------------------------------------------------------------------------- - [define (application settings) - (graph:setup settings) + [define (application settings callbacks) + (graph:setup settings callbacks) (graph:loop)] ] Index: test.scm ================================================================== --- test.scm +++ test.scm @@ -117,16 +117,15 @@ ;; -------------------------------------------------------------------------------------------- ;; Application Entry ;; -------------------------------------------------------------------------------------------- - (application `[ - (title: . "SchemEnginE v1.0 Test") ; title of the window - (width: . 640) ; width of the window - (height: . 480) ; height of the window - (fullscreen: . #f) ; windowed mode - (on-init: . ,on-init) ; initialization method - (on-resize: . ,on-resize) ; resizing method - (on-draw: . ,on-draw) ; drawing method - (on-update: . ,on-update) ; updating method - ]) + (application + `[ (title: . "SchemEnginE v1.0 Test") ; title of the window + (width: . 640) ; width of the window + (height: . 480) ; height of the window + (fullscreen: . #f)] ; windowed mode + `[ (on-init: . ,on-init) ; initialization method + (on-resize: . ,on-resize) ; resizing method + (on-draw: . ,on-draw) ; drawing method + (on-update: . ,on-update)]) ; updating method ]