X-Git-Url: https://git.jsancho.org/?a=blobdiff_plain;f=irrlicht%2Fvideo.scm;h=f4feff4f4b552f6ac5d0b1f2affcb4b4b14169fa;hb=7aaa8f11f628e04766c229e48124fa41a9da482e;hp=23f9db497ca6c35caa1d89ff4ac5cb7cb873505c;hpb=671b139a1cc72854edc73325a7feac30fd8705a8;p=guile-irrlicht.git diff --git a/irrlicht/video.scm b/irrlicht/video.scm index 23f9db4..f4feff4 100644 --- a/irrlicht/video.scm +++ b/irrlicht/video.scm @@ -64,23 +64,21 @@ (normalize-normals #f) (use-mip-maps #t)) (let ((SMaterial_make (get-irrlicht-proc "SMaterial_make"))) - (make - #:irr-pointer - (SMaterial_make #:material-type material-type #:ambient-color ambient-color - #:diffuse-color diffuse-color #:emissive-color emissive-color - #:specular-color specular-color #:shininess shininess - #:material-type-param material-type-param - #:material-type-param-2 material-type-param-2 - #:thickness thickness #:z-buffer z-buffer #:anti-aliasing anti-aliasing - #:color-mask color-mask #:color-material color-material - #:blend-operation blend-operation - #:polygon-offset-factor polygon-offset-factor - #:polygon-offset-direction polygon-offset-direction - #:wireframe wireframe #:point-cloud point-cloud - #:gouraud-shading gouraud-shading #:lighting lighting - #:z-write-enable z-write-enable #:backface-culling backface-culling - #:frontface-culling frontface-culling #:fog-enable fog-enable - #:normalize-normals normalize-normals #:use-mip-maps use-mip-maps)))) + (SMaterial_make #:material-type material-type #:ambient-color ambient-color + #:diffuse-color diffuse-color #:emissive-color emissive-color + #:specular-color specular-color #:shininess shininess + #:material-type-param material-type-param + #:material-type-param-2 material-type-param-2 + #:thickness thickness #:z-buffer z-buffer #:anti-aliasing anti-aliasing + #:color-mask color-mask #:color-material color-material + #:blend-operation blend-operation + #:polygon-offset-factor polygon-offset-factor + #:polygon-offset-direction polygon-offset-direction + #:wireframe wireframe #:point-cloud point-cloud + #:gouraud-shading gouraud-shading #:lighting lighting + #:z-write-enable z-write-enable #:backface-culling backface-culling + #:frontface-culling frontface-culling #:fog-enable fog-enable + #:normalize-normals normalize-normals #:use-mip-maps use-mip-maps))) (export make-material) @@ -104,6 +102,13 @@ video-data source-rect))) +(define-method (draw-vertex-primitive-list (video-driver ) vertices indices . rest) + (let-keywords rest #f + ((v-type 'standard) + (p-type 'triangles)) + (let ((drawVertexPrimitiveList (get-irrlicht-proc "drawVertexPrimitiveList" video-driver))) + (drawVertexPrimitiveList video-driver vertices indices v-type p-type)))) + (define-method (end-scene (video-driver )) ((get-irrlicht-proc "endScene" video-driver) video-driver)) @@ -117,17 +122,19 @@ (getName video-driver))) (define-method (get-texture (video-driver ) filename) - (make - #:irr-pointer - ((get-irrlicht-proc "getTexture" video-driver) - video-driver - filename))) + (let ((getTexture (get-irrlicht-proc "getTexture" video-driver))) + (getTexture video-driver filename))) (define-method (set-material! (video-driver ) (material )) (let ((setMaterial (get-irrlicht-proc "setMaterial" video-driver))) (setMaterial video-driver material))) -(export begin-scene end-scene get-fps get-name get-texture set-material!) +(define-method (set-transform! (video-driver ) state mat) + (let ((setTransform (get-irrlicht-proc "setTransform" video-driver))) + (setTransform video-driver state mat))) + +(export begin-scene draw-vertex-primitive-list end-scene get-fps get-name get-texture + set-material! set-transform!) ;; S3DVertex @@ -140,8 +147,6 @@ (define (make-vertex3d position normal color tcoords) (let ((S3DVertex_make (get-irrlicht-proc "S3DVertex_make"))) - (make - #:irr-pointer - (S3DVertex_make position normal color tcoords)))) + (S3DVertex_make position normal color tcoords))) (export get-position make-vertex3d)