[ocaml-opengl] WebGL (was: LablGL's Raw module)

Anthony Tavener anthony.tavener at gmail.com
Wed Mar 13 20:30:48 GMT 2013


Ah, yes, I did run into mention of David Sheets' work and got stuck at the
Ashima site with a cute looking game, but I was looking for implementation
details at the time. ;) Thanks for those links Anil!

I never did get into browser-based applications, but that's the new way now
and that does seem pretty cool to be able to program OCaml through your
browser with no installation steps and even leverage WebGL! It sounds
easy enough that I might try jumping in. Although... one thing about GLES2
is that it takes a bit of groundwork to be able to use it (being a thinner
layer between the hardware). Does WebGL add a bunch of convenience
functions, or does Sheets? Or is there a lot of copy/paste into TryOCaml
to get something visible?

Buffer abstraction... I use Bigarray a lot. Strings-as-data only if I don't
care
about what the data is -- treating it like a binary blob. Because strings
are
quite limited, and I think I tend to use them immutably.



On Wed, Mar 13, 2013 at 1:51 PM, Anil Madhavapeddy <anil at recoil.org> wrote:

> On 13 Mar 2013, at 19:41, Anthony Tavener <anthony.tavener at gmail.com>
> wrote:
> >
> > In response to this mailing-list starting, and apparent interest in
> OpenGL
> > with OCaml, I looked into the current state of things yesterday. Not much
> > has changed... except you (Florent) have gotten a patch into LablGL for
> > shader support -- hooray! And I also found someone else has added
> > changes to glcaml/sdlcaml and posted them here:
>
> My interest in OpenGL has also been renewed by js_of_ocaml and WebGL...
> David Sheets did a great presentation on his work on WebGL at the last
> OCaml workshop: http://www.youtube.com/watch?v=ll9z1ULtgqo
>
> ...and there's lots of WebGL/OCaml code up at:
> https://github.com/ashima/
> (last I looked, it uses ocamljs and not js_of_ocaml yet, though).
>
> I have in my head an awesome demo that involves the TryOCaml js toplevel,
> and a WebGL window that responds in realtime :-)
>
> I'm not really sure what the right buffer abstraction is that will work
> with js_of_ocaml and OpenGL too. js_of_ocaml has some trickery to cast
> strings as either immutable (i.e. native Javascript) and mutable (i.e.
> native OCaml).  This doesn't work in native code, and Bigarrays are
> much more explicit and flexible since they wrap system memory that is
> outside the OCaml heap.
>
> Anyway, lots to play with here...
>
> -anil
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ocaml.org/pipermail/opengl/attachments/20130313/c23e18e7/attachment-0001.html>


More information about the OpenGL mailing list