(use-modules (irrlicht))
;; start up the engine
-(define device (create-device 'software '(640 480) 16 #f #f #f))
+(define device
+ (create-device
+ #:device-type 'software
+ #:window-size '(640 480)))
(when (not device)
(exit #f))
(define gui-env (get-gui-environment device))
;; static text
-(add-static-text! gui-env
- "Hello World! This is the Irrlicht Software renderer!"
- '(10 10 260 22)
- #t)
+(add-static-text!
+ gui-env
+ "Hello World! This is the Irrlicht Software renderer!"
+ '(10 10 260 22)
+ #:border #t)
;; load a Quake2 model
-(define mesh (get-mesh scene-manager "examples/media/sydney.md2"))
+(define mesh (get-mesh scene-manager "media/sydney.md2"))
(when (not mesh)
- (device-drop! device)
+ (drop! device)
(exit #f))
-(define node (add-animated-mesh-scene-node scene-manager mesh))
+(define node (add-animated-mesh-scene-node! scene-manager mesh))
(when node
- (set-material-flag-am! node 'lighting #f)
+ (set-material-flag! node 'lighting #f)
(set-md2-animation! node 'stand)
- (set-material-texture-am! node 0 (get-texture driver "examples/media/sydney.bmp")))
+ (set-material-texture! node 0 (get-texture driver "media/sydney.bmp")))
;; place camera
-(add-camera-scene-node scene-manager #:position '(0 30 -40) #:lookat '(0 5 0))
+(add-camera-scene-node! scene-manager #:position '(0 30 -40) #:lookat '(0 5 0))
;; draw everything
-(while (device-run? device)
- (begin-scene driver #t #t '(255 100 101 140))
+(while (run device)
+ (begin-scene driver #:color '(255 100 101 140))
(scene-draw-all scene-manager)
(gui-draw-all gui-env)
(end-scene driver))
;; delete device
-(device-drop! device)
+(drop! device)
(exit #t)