From: Javier Sancho Date: Mon, 11 May 2020 12:04:29 +0000 (+0200) Subject: get-texture set-material-texture! X-Git-Url: https://git.jsancho.org/?a=commitdiff_plain;h=0c1a3f2b2c43965ee045b21ca4791e7ad93348ff;p=guile-irrlicht.git get-texture set-material-texture! --- diff --git a/irrlicht.scm b/irrlicht.scm index 6c0fb98..60a4f35 100644 --- a/irrlicht.scm +++ b/irrlicht.scm @@ -23,14 +23,17 @@ #:use-module (irrlicht device) #:use-module (irrlicht gui) #:use-module (irrlicht scene) + #:use-module (irrlicht video) #:re-export (add-animated-mesh-scene-node! add-static-text! create-device get-gui-environment get-mesh get-scene-manager + get-texture get-video-driver is-empty? set-material-flag! + set-material-texture! set-md2-animation! set-window-caption!)) diff --git a/irrlicht/scene.scm b/irrlicht/scene.scm index 9ecb782..3ca6326 100644 --- a/irrlicht/scene.scm +++ b/irrlicht/scene.scm @@ -24,7 +24,8 @@ #:use-module (irrlicht base) #:use-module (irrlicht foreign) #:use-module (irrlicht io) - #:use-module (irrlicht irr)) + #:use-module (irrlicht irr) + #:use-module (irrlicht video)) ;; IMesh @@ -85,7 +86,13 @@ flag new-value)) -(export set-material-flag!) +(define-method (set-material-texture! (node ) texture-layer (texture )) + ((get-irrlicht-proc "setMaterialTexture" node) + (irr-pointer node) + texture-layer + (irr-pointer texture))) + +(export set-material-flag! set-material-texture!) ;; ISceneNode diff --git a/irrlicht/video.scm b/irrlicht/video.scm index d3b6f8a..f0f56a3 100644 --- a/irrlicht/video.scm +++ b/irrlicht/video.scm @@ -24,7 +24,22 @@ #:use-module (irrlicht foreign)) +;; ITexture +(define-class () + (irr-class #:init-value "ITexture" #:getter irr-class)) + +(export ) + + ;; IVideoDriver -(define-class ()) +(define-class () + (irr-class #:init-value "IVideoDriver" #:getter irr-class)) + +(define-method (get-texture (video-driver ) filename) + (make + #:irr-pointer + ((get-irrlicht-proc "getTexture" video-driver) + (irr-pointer video-driver) + filename))) -(export ) +(export get-texture)