[MLton] FFI and 3D C arrays.

Matthew Fluet fluet@cs.cornell.edu
Thu, 22 Jan 2004 10:04:38 -0500 (EST)


> What is the sensible way to construct and pass an MLton equivalent  to a 3D
> C array such as "GLfloat pts1[4][4][3]" into a function call such as this:
>
> gluNurbsSurface(nurb, 8, knots, 8, knots,
>         4 * 3, 3, &pts1[0][0][0],
>         4, 4, GL_MAP2_VERTEX_3);

I think you need to pass a 1D ML array of the appropriate size
(e.g., 4 * 4 * 3).