]> git.jsancho.org Git - guile-irrlicht.git/commitdiff
begin-scene
authorJavier Sancho <jsf@jsancho.org>
Mon, 11 May 2020 12:19:37 +0000 (14:19 +0200)
committerJavier Sancho <jsf@jsancho.org>
Mon, 11 May 2020 12:19:37 +0000 (14:19 +0200)
irrlicht.scm
irrlicht/video.scm

index 6f11ed3754a4ac840178c171695b9f356d0aa92b..b1c3a827d9679b142c3b76745d76e6104c22add0 100644 (file)
@@ -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
index f0f56a3871235237718497b5c104d01a5b2248c8..0d0b37fc1bba3adf49f67c596a3621370c4c311f 100644 (file)
@@ -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))
 
 (define-class <video-driver> (<irrlicht-base>)
   (irr-class #:init-value "IVideoDriver" #:getter irr-class))
 
+(define-method (begin-scene (video-driver <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 <video-driver>) filename)
   (make <texture>
     #:irr-pointer
@@ -42,4 +58,4 @@
      (irr-pointer video-driver)
      filename)))
 
-(export <video-driver> get-texture)
+(export <video-driver> begin-scene get-texture)