- From: Charles Pritchard <chuck@jumis.com>
- Date: Tue, 01 Nov 2011 11:36:27 -0700
- To: Mike Bostock <mbostock@cs.stanford.edu>
- CC: Rik Cabanier <cabanier@gmail.com>, Cameron McCormack <cam@mcc.id.au>, www-svg@w3.org
> If I have time, I'd like to prototype a JavaScript shim that renders > SVG to WebGL to see how difficult it is. Obviously, I'd start with a > very limited subset, such as rects.:) I expect that certain things > (such as filters, masking, pattern fills) may be more difficult to > support without an intermediate immediate-mode graphics layer. Those items are relatively easy in WebGL. You'll want to use Canvas to render paths with curves in them. You can just render them into a single color and upload them as textures. Otherwise, you're going to have to do quite a bit of work to tesselate the paths. You can save some time by re-using this library: https://github.com/corbanbrook/webgl-2d -Charles
Received on Tuesday, 1 November 2011 18:37:08 UTC