[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Public WebGL] Should texImage2D and texSubImage2D accept more element types?




On 5/30/12 4:03 PM, Gregg Tavares (社用) wrote:
Firefox supports drawing an svg image to a canvas

Hold. Back up. You tested an SVG file inside an image. I'm talking about <svg:image>, which can be pointing to a JPEG or a PNG or whatever, not just to SVG.

Something like this:

  <svg:image xlink:href="something.png">

and then using drawImage on it to a 2d canvas works just fine in Gecko.
 I can't speak for other UAs.  And yes, there's an issue against the 2d
canvas spec to support that, last I checked.

I feel like SVG support for canvas 2d probably needs to specced and
sorted out before we worry about adding it to WebGL.

I'm not talking about SVG support; you're correct that this is a whole separate kettle of fish. I'm talking about bitmap image support when the bitmap is loaded in an <svg:image> (because your app is perhaps using SVG instead of HTML for its UI).

If it works with canvas then you can always do svg->canvas->texture

Well, yes, but why make people jump through those hoops?

Again, the desired endpoint is that <svg:image> and <html:img> have as
few behavior differences as possible, since pretty much all the
differences they do have are completely artificial.

-Boris

-----------------------------------------------------------
You are currently subscribed to public_webgl@khronos.org.
To unsubscribe, send an email to majordomo@khronos.org with
the following command in the body of your email:
unsubscribe public_webgl
-----------------------------------------------------------