caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Jon Harrop <jon@ffconsultancy.com>
To: caml-list@yquem.inria.fr
Subject: Re: [Caml-list] What does Jane Street use/want for an IDE? What about you?
Date: Wed, 5 Nov 2008 16:39:23 +0000	[thread overview]
Message-ID: <200811051639.23844.jon@ffconsultancy.com> (raw)
In-Reply-To: <200811051020.27633.ober.14@osu.edu>

On Wednesday 05 November 2008 15:20:26 Kuba Ober wrote:
> > > Have you ran recent Qt demos distributed with Qt? I'd say they look
> > > pretty cool in my book.
> >
> > They would not have impressed me a decade ago, let alone today. Many of
> > them don't even work on either of my Debian machines.
>
> I have one question regarding OpenGL: maybe it's just me, but isn't core,
> or "historical" core OpenGL blissfully unaware of simple concepts such as a
> path, a brush, stroking a path etc?

That is correct. Smoke already implements all of that:

  http://www.ffconsultancy.com/products/smoke_vector_graphics/?ob

> This was long time ago, but I recall 
> that drawing a circle using OpenGL implies that you (or some middleman
> library) has to discretize the circle into triangles, and then render that.

Smoke uses a much more sophisticated approach based upon anisotropic 
hierarchical decomposition that provides high-performance culling of 
arbitrary vector shapes. So you can feed it a Gb map of the world and use it 
to fly around in real-time without having to write anything difficult 
yourself. You can even apply arbitrary affine transforms to vector shapes and 
it will continue to make maximal reuse of tesselations and cache them on 
graphics hardware if it is available.

> Again, correct me if I'm wrong, but typical OpenGL-based UI rendering
> will do good old antialiased software 2D rendering on OpenGL textures,
> and the composite some simple 3D models with those textures applied.
> [Or it may, at a cost of generating *way more* triangles, use shader
> programs.]

No, Smoke keeps everything in vector form and renders triangles. Smoke can 
also run entirely in software using Mesa and can render PostScript in 
software over an order of magnitude faster than GhostView. But Smoke was 
designed specifically to leverage hardware accelerated OpenGL and it runs 
about two orders of magnitude faster when that is available.

> That way you can get goodies like shadows of text rendered in a window
> with transparent background, but it's really awkward to do directly in
> OpenGL. These days I imagine this "2D" rendering can be done using
> shader programs, but that excludes a lot of commonplace hardware
> outright, and hits some implementation bugs hard (just look around at
> various game forums). And I really don't quite love the idea of
> generating a bazillion triangles for the 3D hardware to then
> shade: I wish 3D hardware could work with splines of some sort (does it?).

The nVidia 9 series is the first hardware to provide decent support for 
splines, AFAIK. Decent support requires vertex creation in-hardware.

> AFAIK/IIRC, as soon as you wish to move to a higher level scene
> description, where basic primitives such as paths live in 3D, you have
> to implement a whole lot on top of OpenGL, and there are no real
> standards as to how to do it. If anything, Cocoa and MPF (?) may be
> examples of how to go about it, but that's a long shot of where
> we'd all like to be.

I don't think it is a long shot at all.

> I would like nothing better than to work with hierarchical interactive
> display representation, where simple things remain simple: say you have
> a letter shown in your text editor widget, and you want to know where
> the said letter is located. With a scene description graph, you can
> extract that information -- the way Qt does it so far either requires the
> text layouter to provide you with relevant API, or you have to plug
> yourself between the layouter and the paint engine and literally listen for
> where the glyphs get painted. The scene description would be easier to use,
> of course. If the scene description has links into the underlying text
> document, as it well should, then it gets even easier.

Smoke already provides a basic form of that functionality. It uses OpenGL 
picking to provide a list of integers that describe the path through the 
scene graph to the nearest shape in the given region. Check out the source 
code to the interactive tiger demo, for example.

> So, please understand that I'm not oblivious to benefits of thinking in
> higher levels of abstraction, but I'm also practical and know that Qt
> provides me with a whole big lot of cross-platform functionality that
> simply doesn't exist anywhere else in one coherent platform.

Maybe if I release Smoke as open source software OCaml will become usable for 
advanced GUI programming. If I don't, I think OCaml is dead in the water in 
this respect.

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


  reply	other threads:[~2008-11-05 15:37 UTC|newest]

Thread overview: 76+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-10-20 13:19 Kuba Ober
2008-10-20 13:37 ` [Caml-list] " Mark Shinwell
2008-10-20 14:05   ` Thomas Gazagnaire
2008-10-20 15:45     ` Robert Morelli
2008-10-20 15:56       ` David Teller
2008-10-20 17:15         ` Yitzhak Mandelbaum
2008-10-20 20:51           ` Maxence Guesdon
2008-10-21 13:04         ` Jean-Marie Gaillourdet
2008-10-20 20:15       ` Richard Jones
2008-10-20 20:32         ` Kuba Ober
2008-10-20 23:02         ` Robert Morelli
2008-10-21  2:22           ` Peng Zang
2008-10-21 16:57           ` Christian Stork
2008-10-21 12:16       ` tags (Was: [Caml-list] What does Jane Street use/want for an IDE? What about you?) Florian Hars
2008-10-20 20:16     ` [Caml-list] What does Jane Street use/want for an IDE? What about you? Kuba Ober
2008-10-20 14:33   ` Andres Varon
2008-10-20 19:54     ` Peng Zang
2008-10-20 14:47 ` Martin Jambon
2008-10-20 20:14   ` Kuba Ober
2008-10-21 13:14 ` Dmitry Bely
2008-10-21 13:50   ` Hugo Ferreira
2008-10-21 18:35     ` Kuba Ober
2008-10-21 19:31       ` Till Varoquaux
2008-10-21 20:26         ` Philippe Strauss
2008-10-22 12:42           ` Kuba Ober
2008-10-22 21:56             ` David Teller
2008-10-22 22:39               ` David Teller
2008-10-23  7:47             ` Hugo Ferreira
2008-10-23  8:27               ` Romain Bardou
2008-10-23 10:13                 ` Thomas Gazagnaire
2008-10-23 11:01                   ` Hugo Ferreira
2008-10-23 14:13                     ` Vincent Hanquez
2008-10-23 14:43                       ` Romain Bardou
2008-10-23 15:22                         ` Dave Benjamin
2008-10-25 10:14                           ` DooMeeR
2008-10-25 12:05                             ` Jacques Garrigue
2008-10-25 12:43                             ` Martin Jambon
2008-10-25 13:22                               ` Daniel Bünzli
2008-10-25 23:08                                 ` Indentation (was Re: [Caml-list] What does Jane Street use/want for an IDE? What about you?) Martin Jambon
2008-10-26 16:23                                   ` Daniel Bünzli
2008-10-26 19:41                                     ` Martin Jambon
2008-10-23 17:20                       ` [Caml-list] What does Jane Street use/want for an IDE? What about you? Kuba Ober
2008-10-23 17:17               ` Kuba Ober
2008-10-23  0:22         ` Peng Zang
     [not found] ` <200810221330.11103.ober.14@osu.edu>
     [not found]   ` <D3D47C54-888B-4F14-9C5D-79FF3D9F96D6@gmail.com>
2008-10-23 17:13     ` Kuba Ober
2008-11-01  1:41 ` Jon Harrop
2008-11-03 14:15   ` Kuba Ober
2008-11-03 23:11     ` Jon Harrop
2008-11-04 18:35       ` Kuba Ober
2008-11-04 23:36         ` Jon Harrop
2008-11-04 23:06           ` Kuba Ober
2008-11-05  5:48             ` Jon Harrop
2008-11-05  8:53               ` Paolo Donadeo
2008-11-05 15:01                 ` Jon Harrop
2008-11-05 15:05                   ` Kuba Ober
2008-11-05 16:56                     ` Jon Harrop
2008-11-05 14:58               ` Kuba Ober
2008-11-05 15:20               ` Kuba Ober
2008-11-05 16:39                 ` Jon Harrop [this message]
2008-11-05 15:55                   ` Kuba Ober
2008-11-05 17:08                     ` Jon Harrop
2008-11-05 17:36                       ` Jon Harrop
2008-11-15 13:02                 ` Jon Harrop
2008-11-15 12:25                   ` Richard Jones
2008-11-15 20:41                     ` Jon Harrop
2008-11-16 12:04                       ` Florent Monnier
2008-11-05  8:39           ` Paolo Donadeo
2008-11-05 15:44             ` Kuba Ober
2008-11-05 17:03               ` Jon Harrop
2008-11-05 16:41                 ` Kuba Ober
2008-11-05 16:46             ` Jon Harrop
2008-11-05 16:33           ` Jérémie Dimino
2008-11-05 16:43             ` Kuba Ober
2008-11-05 17:41             ` Jon Harrop
2008-10-23 13:53 Baudet David
2008-10-24  7:17 ` Maxence Guesdon

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=200811051639.23844.jon@ffconsultancy.com \
    --to=jon@ffconsultancy.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;
as well as URLs for NNTP newsgroup(s).