From: Javier Sancho Date: Thu, 3 Oct 2019 11:26:09 +0000 (+0200) Subject: get-video-driver X-Git-Url: https://git.jsancho.org/?a=commitdiff_plain;h=a0bd5bb1a5cb96586af24eaab0a4393fdb44127c;p=guile-irrlicht.git get-video-driver --- diff --git a/irrlicht.scm b/irrlicht.scm index 39c8ca4..6da6ce9 100644 --- a/irrlicht.scm +++ b/irrlicht.scm @@ -24,7 +24,8 @@ #: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)) + #:export (create-device + get-video-driver)) (define* (create-device #:optional (device-type 'software) @@ -46,3 +47,6 @@ (if fullscreen 1 0) (if stencilbuffer 1 0) (if vsync 1 0)))) + +(define (get-video-driver device) + (ffi:get-video-driver device)) diff --git a/irrlicht/bindings.scm b/irrlicht/bindings.scm index af85526..102494e 100644 --- a/irrlicht/bindings.scm +++ b/irrlicht/bindings.scm @@ -19,13 +19,18 @@ (define-module (irrlicht bindings) - #:use-module (system foreign) - #:export (create-device)) + #:use-module (system foreign)) (define cirr (dynamic-link "libCIrrlicht")) -(define create-device +(define-public create-device (pointer->procedure '* (dynamic-func "irr_createDevice" cirr) (list int '* uint32 int int int))) + +(define-public get-video-driver + (pointer->procedure + '* + (dynamic-func "irr_IrrlichtDevice_getVideoDriver" cirr) + (list '*)))