+;;; guile-irrlicht --- FFI bindings for Irrlicht Engine
+;;; Copyright (C) 2019 Javier Sancho <jsf@jsancho.org>
+;;;
+;;; This file is part of guile-irrlicht.
+;;;
+;;; Guile-irrlicht is free software; you can redistribute it and/or modify
+;;; it under the terms of the GNU Lesser General Public License as
+;;; published by the Free Software Foundation; either version 3 of the
+;;; License, or (at your option) any later version.
+;;;
+;;; Guile-irrlicht is distributed in the hope that it will be useful, but
+;;; WITHOUT ANY WARRANTY; without even the implied warranty of
+;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+;;; General Public License for more details.
+;;;
+;;; You should have received a copy of the GNU Lesser General Public
+;;; License along with guile-irrlicht. If not, see
+;;; <http://www.gnu.org/licenses/>.
+
+
+;;; Irrlicht 01.HelloWorld example
+;;; http://irrlicht.sourceforge.net/docu/example001.html
+
+
+(use-modules (irrlicht))
+
+;; start up the engine
+(define device (create-device 'software '(640 480) 16 #f #f #f))
+(when (not device)
+ (exit #f))
+
+(set-window-caption! device "Hello World! - Irrlicht Engine Demo")
+
+(define driver (get-video-driver device))
+(define scene-manager (get-scene-manager device))
+(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)
+
+;; draw everything
+(while (device-run? device)
+ (begin-scene driver #t #t '(255 100 101 140))
+ (gui-draw-all gui-env)
+ (end-scene driver))
+
+;; delete device
+(device-drop! device)
+(exit #t)