From 009998e281d24dc110661d2f348094376f1b57d5 Mon Sep 17 00:00:00 2001 From: David Thompson Date: Sat, 6 Sep 2014 14:56:29 -0400 Subject: 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. --- sly/window.scm | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) (limited to 'sly/window.scm') 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." -- cgit v1.2.3