From: Jon Harrop <jon@jdh30.plus.com>
To: caml-list@yquem.inria.fr
Subject: Re: [Caml-list] Cross-platform "Hello, World" graphical application in OCaml
Date: Tue, 22 Feb 2005 21:23:31 +0000 [thread overview]
Message-ID: <200502222123.31485.jon@jdh30.plus.com> (raw)
In-Reply-To: <20050222202426.GA25230@furbychan.cocan.org>
On Tuesday 22 February 2005 20:24, Richard Jones wrote:
> On Tue, Feb 22, 2005 at 07:24:28PM +0000, Jon Harrop wrote:
> > On Tuesday 22 February 2005 17:23, Richard Jones wrote:
> > > WxWindows isn't really suitable for what I want to do because it
> > > doesn't support a rich canvas widget, nor a good rich text editor.
> >
> > Does it support cross-platform OpenGL? If so then you could write your
> > GUI in OpenGL...
>
> Joke, right?
No, not at all.
Just this afternoon, a friend of mine suggested that I commercialise the OCaml
port of my vector graphics engine:
http://www.chem.pwf.cam.ac.uk/~jdh30/programming/opengl/smoke/
The OCaml implementation is much more evolved and vastly easier to use, of
course. In particular, it makes cross-platform GUIs relatively trivial.
I didn't believe him though. I mean who would want to be able to write
cross-platform GUIs easily? Especially smoothly animated ones with alpha
blending, texture mapping and integrated 2D and 3D.
Seriously though, if I did this, would anyone be interested in buying it to
develop commercial applications with for, say, 1,000UKP?
> Blender actually has a GUI written in OpenGL. One of
> the remarkable consequences of this is that you can smoothly zoom and
> sheer the controls ...
Yes, if you're already using OpenGL then there are a lot of advantages to
having an OpenGL-based GUI. Even if you're not already using OpenGL, it is
the most cross-platform GUI-capable API and runs on virtually any modern
computer, typically with performance orders of magnitude better than anything
you'll get with Qt, GTK, WxWindows or any other software renderer.
I develop for Linux and just had a go on another friend's Apple PowerBook.
Once you've added <-cclib "-framework Foundation"> to the link line, the
OCaml code compiles and runs beautifully.
If you want some examples of trivial OpenGL programs written in OCaml, have a
look at the freebies from my book:
http://www.ffconsultancy.com/products/ocaml_for_scientists/visualisation
There are Linux and Mac OS X executables you can just click on. Also, check
out the examples which come with lablGL and lablglut.
The main omission for me is then the lack of native-looking drop-down menus
and a save dialog. I tried to port my lablglut-based code to lablgtk but
failed miserably - I couldn't even get a window with a menu bar and a
full-size OpenGL widget.
Incidentally, would someone be so kind as to send me some Windows executables
of my demos? Then we could have the full complement. :-)
--
Dr Jon D Harrop, Flying Frog Consultancy Ltd.
http://ffconsultancy.com
next prev parent reply other threads:[~2005-02-22 21:22 UTC|newest]
Thread overview: 54+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-02-22 12:03 Richard Jones
2005-02-22 12:15 ` [Caml-list] " Sven Luther
2005-02-22 12:28 ` Richard Jones
2005-02-22 12:35 ` Sven Luther
2005-02-22 12:53 ` Richard Jones
2005-02-22 14:27 ` Sven Luther
2005-02-22 13:36 ` Vincenzo Ciancia
2005-02-22 14:03 ` [Caml-list] " Richard Jones
2005-02-22 17:46 ` Christophe TROESTLER
2005-02-22 23:50 ` Oliver Bandel
2005-02-23 13:58 ` Christophe TROESTLER
2005-02-23 8:15 ` Sven Luther
2005-02-23 14:08 ` Christophe TROESTLER
2005-02-23 16:15 ` Sven Luther
2005-02-24 16:20 ` Christophe TROESTLER
2005-02-23 8:07 ` Evan Martin
2005-02-22 14:08 ` Michael Walter
2005-02-22 17:05 ` [Caml-list] " Blair Zajac
2005-02-22 17:23 ` Richard Jones
2005-02-22 19:24 ` Jon Harrop
2005-02-22 20:24 ` Richard Jones
2005-02-22 21:23 ` Jon Harrop [this message]
2005-02-22 22:13 ` chris.danx
2005-02-22 23:00 ` Jon Harrop
2005-02-23 0:18 ` Oliver Bandel
2005-02-23 17:24 ` Christopher Campbell
2005-02-22 23:38 ` Richard Jones
2005-02-22 21:26 ` chris.danx
2005-02-22 22:16 ` Jon Harrop
2005-02-22 23:30 ` Daniel Bünzli
2005-02-23 0:05 ` Jon Harrop
2005-02-23 3:05 ` Michael Walter
2005-02-23 3:13 ` Daniel Bünzli
2005-02-23 3:57 ` Jon Harrop
2005-02-23 7:29 ` Bardur Arantsson
2005-02-23 11:21 ` Jon Harrop
2005-02-23 11:45 ` Bardur Arantsson
2005-02-23 0:27 ` Oliver Bandel
2005-02-22 20:57 ` chris.danx
2005-02-23 9:58 ` Olivier Andrieu
2005-02-23 17:23 ` Christopher Campbell
2005-02-23 0:02 ` Oliver Bandel
2005-02-23 11:37 ` Jon Harrop
2005-03-01 14:35 ` Ingo Bormuth
2005-02-22 23:59 ` Oliver Bandel
2005-02-23 15:21 ` William D. Neumann
2005-02-24 0:44 ` Oliver Bandel
[not found] <20050223054011.3414.28936.Mailman@yquem.inria.fr>
2005-03-02 6:36 ` Ken Rawlings
2005-03-02 6:56 ` Nicolas Cannasse
2005-03-02 11:40 ` Richard Jones
2005-03-02 12:06 ` Nicolas Cannasse
2005-03-05 12:51 ` Sven Luther
2005-03-05 12:31 Grégory Guyomarc'h
2005-03-05 13:09 Gregory Guyomarc'h
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200502222123.31485.jon@jdh30.plus.com \
--to=jon@jdh30.plus.com \
--cc=caml-list@yquem.inria.fr \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox