From 7dda4e01bc5cfa5d5533f15a5729dff04292d4dc Mon Sep 17 00:00:00 2001 From: Javier Sancho Date: Mon, 11 May 2020 14:19:37 +0200 Subject: [PATCH] begin-scene --- irrlicht.scm | 1 + irrlicht/video.scm | 18 +++++++++++++++++- 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/irrlicht.scm b/irrlicht.scm index 6f11ed3..b1c3a82 100644 --- a/irrlicht.scm +++ b/irrlicht.scm @@ -27,6 +27,7 @@ #:re-export (add-animated-mesh-scene-node! add-camera-scene-node! add-static-text! + begin-scene create-device get-gui-environment get-mesh diff --git a/irrlicht/video.scm b/irrlicht/video.scm index f0f56a3..0d0b37f 100644 --- a/irrlicht/video.scm +++ b/irrlicht/video.scm @@ -20,6 +20,7 @@ (define-module (irrlicht video) #:use-module (oop goops) + #:use-module (ice-9 optargs) #:use-module (irrlicht base) #:use-module (irrlicht foreign)) @@ -35,6 +36,21 @@ (define-class () (irr-class #:init-value "IVideoDriver" #:getter irr-class)) +(define-method (begin-scene (video-driver ) . rest) + (let-keywords rest #f + ((back-buffer #t) + (z-buffer #t) + (color '(255 0 0 0)) + video-data + source-rect) + ((get-irrlicht-proc "beginScene" video-driver) + (irr-pointer video-driver) + back-buffer + z-buffer + color + video-data + source-rect))) + (define-method (get-texture (video-driver ) filename) (make #:irr-pointer @@ -42,4 +58,4 @@ (irr-pointer video-driver) filename))) -(export get-texture) +(export begin-scene get-texture) -- 2.39.5