Hi, I've been wanting to try out the FDX demo however it gave me a series of errors and warnings due to compatibility issues, so I've been trying to get it working correctly. The full code is on a pastebin.
I'm having trouble with the code here :
let drawSurf f (device:Device) =
let m,n = meshDims !mesh in
let data = Array.init (n*m) (fun k ->
let i,j = k2ij !mesh k in
let x,y = meshGet !mesh (i,j) in
let z = f (x,y) in // single precision f
(x,y,z))
in
let strips = triangleRows n m |> map (map (blendPlace !mesh data)) in
List.iter (fun strip -> drawTriangeStrip strip device) strips;
let m,n = meshDims !mesh in
let lines = gridLines n m in
let lines = lines |> map (colorPlace !mesh data Color.Black) in
drawLineList lines device
which gives me the following error in F# interactive.
motion-sample.fs(438,53): error FS0001: Type mismatch. Expecting a
((('a * 'b) list -> 'c) * (('a * 'b) list -> 'd)) ref
but given a
(float [,] * float [,]) ref.
The type '('a * 'b) list -> 'c' does not match the type 'float [,]'
Thanks for any help!