X-Git-Url: https://git.jsancho.org/?a=blobdiff_plain;f=irrlicht%2Fbindings%2Fvideo.scm;h=0bdf0f0c908b2fbff0bdc2fd71a01fc80ad51f06;hb=4eb7b8f04ad278d49d632d62030b5fe648e3b97a;hp=7816686b02ca761598996e63f7d0e0fdabba9042;hpb=0db087e68fdb778a73beca6cf0d35d4e718339e5;p=guile-irrlicht.git diff --git a/irrlicht/bindings/video.scm b/irrlicht/bindings/video.scm index 7816686..0bdf0f0 100644 --- a/irrlicht/bindings/video.scm +++ b/irrlicht/bindings/video.scm @@ -79,7 +79,7 @@ '* "irr_video_getName" (list '*)) ;; s3dvertex struct -(define-wrapped-pointer-type s3dvertex +(define-wrapped-pointer-type s3dvertex-type s3dvertex? pointer->s3dvertex s3dvertex->pointer (lambda (vertex port) @@ -88,7 +88,7 @@ (export s3dvertex->pointer) -(define s3dvertex-type +(define-public s3dvertex (list ffi-core:vector3df ffi-core:vector3df scolor @@ -96,4 +96,58 @@ (define-public (make-s3dvertex position normal color t-coords) (pointer->s3dvertex - (make-c-struct s3dvertex-type (list position normal color t-coords)))) + (make-c-struct s3dvertex (list position normal color t-coords)))) + +(define-public (vertex-position vertex) + (let ((data (parse-c-struct (s3dvertex->pointer vertex) s3dvertex))) + (car data))) + +;; smateriallayer struct +(define-public smateriallayer + (list '* uint8 uint8 uint8 uint8 uint8 int8 '* '*)) + +;; smaterial struct +(define-wrapped-pointer-type smaterial-type + smaterial? + pointer->smaterial smaterial->pointer + (lambda (material port) + (format port "#" + (pointer-address (smaterial->pointer material))))) + +(export smaterial->pointer) + +(define-public smaterial + (list smateriallayer smateriallayer smateriallayer smateriallayer ; textureLayer[4] + uint32 ; materialType + scolor ; ambientColor + scolor ; diffuseColor + scolor ; emissiveColor + scolor ; specularColor + float ; shininess + float ; materialTypeParam + float ; materialTypeParam2 + float ; thickness + uint8 ; zBuffer + uint8 ; antiAliasing + (bit-field-group + (uint8 4) ; colorMask:4 + (uint8 3) ; colorMaterial:3 + (uint32 4) ; blendOperation:4 + (uint8 3) ; polygonOffsetFactor:3 + (uint32 1) ; polygonOffsetDirection:1 + (uint8 1) ; wireframe:1 + (uint8 1) ; pointCloud:1 + (uint8 1) ; gouraudShading:1 + (uint8 1) ; lighting:1 + (uint8 1) ; zWriteEnable:1 + (uint8 1) ; backfaceCulling:1 + (uint8 1) ; frontfaceCulling:1 + (uint8 1) ; fogEnable:1 + (uint8 1) ; normalizeNormals:1 + (uint8 1) ; useMipMaps:1 + ))) + +;; (define-public (make-material #:key +;; (wireframe #f) +;; (lighting #t)) +;; material)