diff options
author | David Thompson <dthompson2@worcester.edu> | 2014-09-06 14:56:29 -0400 |
---|---|---|
committer | David Thompson <dthompson2@worcester.edu> | 2014-09-06 14:56:29 -0400 |
commit | 009998e281d24dc110661d2f348094376f1b57d5 (patch) | |
tree | b5b508c0907b12242296eaf99632e7d836869841 /sly/window.scm | |
parent | 8df200f11a2a12e2b3f23269edeac2344776e3fb (diff) |
camera: Add before/after draw handlers.
* sly/camera.scm (camera-before-draw-handler,
camera-after-draw-handler): New procedures.
(make-camera): Add before-draw and after-draw keyword parameters.
(orthographic-camera): Use #:allow-other-keys.
(run-handler): New procedure.
(draw-camera): Enable/disable GL features before/after drawing and run
handlers.
* sly/window.scm (open-window): Remove calls to GL procedures.
Diffstat (limited to 'sly/window.scm')
-rw-r--r-- | sly/window.scm | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/sly/window.scm b/sly/window.scm index 802132f..0e400f5 100644 --- a/sly/window.scm +++ b/sly/window.scm @@ -23,7 +23,6 @@ (define-module (sly window) #:use-module (srfi srfi-9) - #:use-module (gl) #:use-module ((sdl sdl) #:prefix SDL:) #:use-module ((sdl mixer) #:prefix SDL:) #:use-module (sly event) @@ -102,15 +101,7 @@ (SDL:init 'everything) ;; Open SDL window in OpenGL mode. (SDL:set-video-mode width height 24 flags) - (SDL:set-caption (window-title window)) - ;; Enable texturing and alpha blending - (gl-enable (enable-cap texture-2d)) - (gl-enable (enable-cap blend)) - (gl-enable (enable-cap cull-face)) - (gl-enable (enable-cap depth-test)) - (gl-enable (enable-cap scissor-test)) - (set-gl-blend-function (blending-factor-src src-alpha) - (blending-factor-dest one-minus-src-alpha)))) + (SDL:set-caption (window-title window)))) (define (close-window) "Close the currently open window and audio." |