-;; smaterial
-(define* (make-material #:key (wireframe #f) (lighting #t))
- (let ((material
- (list
- ;; textureLayer[4]
- (list %null-pointer 0 0 0 0 0 0 %null-pointer %null-pointer)
- (list %null-pointer 0 0 0 0 0 0 %null-pointer %null-pointer)
- (list %null-pointer 0 0 0 0 0 0 %null-pointer %null-pointer)
- (list %null-pointer 0 0 0 0 0 0 %null-pointer %null-pointer)
- ffi-video:EMT_SOLID ; materialType
- (list 255 255 255 255) ; ambientColor
- (list 255 255 255 255) ; diffuseColor
- (list 0 0 0 0) ; emissiveColor
- (list 255 255 255 255) ; specularColor
- 0 ; shininess
- 0 ; materialTypeParam
- 0 ; materialTypeParam2
- 1 ; thickness
- ffi-video:ECFN_LESSEQUAL ; zBuffer
- ffi-video:EAAM_SIMPLE ; antiAliasing
- (list
- ffi-video:ECP_ALL ; colorMask
- ffi-video:ECM_DIFFUSE ; colorMaterial
- ffi-video:EBO_NONE ; blendOperation
- 0 ; polygonOffsetFactor
- ffi-video:EPO_FRONT ; polygonOffsetDirection
- (bool->integer wireframe) ; wireframe
- (bool->integer #f) ; pointCloud
- (bool->integer #t) ; gouraudShading
- (bool->integer lighting) ; lighting
- (bool->integer #t) ; zWriteEnable
- (bool->integer #t) ; backfaceCulling
- (bool->integer #f) ; frontfaceCulling
- (bool->integer #f) ; fogEnable
- (bool->integer #f) ; normalizeNormals
- (bool->integer #t) ; useMipMaps
- ))))
- (ffi-video:pointer->smaterial
- (make-c-struct+ ffi-video:smaterial material))))