Mailing list for all users of the OCaml language and system.
 help / color / mirror / Atom feed
* Easier FFI
@ 2007-12-20 16:39 Jon Harrop
  2007-12-21  3:37 ` [Caml-list] " Dave Benjamin
  2007-12-21 11:20 ` Richard Jones
  0 siblings, 2 replies; 5+ messages in thread
From: Jon Harrop @ 2007-12-20 16:39 UTC (permalink / raw)
  To: caml-list


I'm currently revisiting the topic of OpenGL bindings because I'd like to have 
a play with vertex and fragment shaders. Getting shaders up and running from 
C++ code is very easy: just a few calls and you pass your shader programs in 
as strings. However, I have been unable to get this working from OCaml using 
any of the existing OpenGL bindings (most notably GLCaml). This got me 
thinking about FFIs.

GLCaml currently autogenerates its bindings from a custom annotated C header 
file. There are some aspects that I'd like to change. For example, GLCaml 
currently seems to use only bigarrays when strings and ordinary OCaml arrays 
seem preferable in several circumstances.

Rather than invest time and effort into tweaking only GLCaml, I'm wondering 
what people's thoughts are about autogenerated FFIs for OCaml in general?

For example, why can't we have a generic FFI library that allows us to use any 
external library (unsafely) without leaving OCaml? Then we could write or 
generate our bindings entirely in OCaml and forget about these C stubs.

How does this relate to SML's NLFFI?

-- 
Dr Jon D Harrop, Flying Frog Consultancy Ltd.
http://www.ffconsultancy.com/products/?e


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2008-02-01 17:13 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-12-20 16:39 Easier FFI Jon Harrop
2007-12-21  3:37 ` [Caml-list] " Dave Benjamin
2007-12-21  3:54   ` Jon Harrop
2007-12-21 11:20 ` Richard Jones
2008-02-01 17:13   ` Alan Falloon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox