(define-module (irrlicht)
#:use-module (ice-9 match)
+ #:use-module (system foreign)
#:use-module ((irrlicht bindings) #:prefix ffi:)
+ #:use-module ((irrlicht bindings core) #:prefix ffi-core:)
#:use-module ((irrlicht bindings video) #:prefix ffi-video:)
#:export (create-device))
-(define* (create-device #:optional (device-type 'software))
+(define* (create-device #:optional
+ (device-type 'software)
+ (window-size '(640 480)))
(let ((driver (match device-type
('null ffi-video:EDT_NULL)
('software ffi-video:EDT_SOFTWARE)
('direct3d8 ffi-video:EDT_DIRECT3D8)
('direct3d9 ffi-video:EDT_DIRECT3D9)
('opengl ffi-video:EDT_OPENGL)
- ('count ffi-video:EDT_COUNT))))
- (ffi:create-device driver)))
+ ('count ffi-video:EDT_COUNT)))
+ (wsize (make-c-struct ffi-core:dimension2d window-size)))
+ (ffi:create-device driver wsize)))