OpenGL from SML

Stephen Weeks MLton@research.nj.nec.com
Thu, 15 Jul 1999 19:10:45 -0700 (PDT)


> I mainly do real-time 3D graphics via OpenGL for a living. For years I've keeping my
> eye out for a way of doing OpenGL from something a little less torturing than C/C++.
> In theory, SML looks like a good candidate, but in practice it's not. The problem is
> not SML's overall efficiency, but its inefficiency when calling a LOT of low-level C
> library routines.

You may be interested to look at MLton
(http://www.neci.nj.nec.com/PLS/MLton/index.html),
which is a whole program SML compiler for X86 machines running Linux.

The latest relese of MLton has an FFI for calling C which has
essentially no overhead, since MLton compiles SML to C and uses gcc.
For details, see section 7 of the user guide, which is available off
of the web page. 

If you have any questions, please send mail to
MLton@reserch.nj.nec.com.