On Dec 23, 2009, at 2:53 AM, Gregg Tavares wrote:
Having more than one context has apparently been around since 2006
No it doesn't, but it also doesn't mention what happens when you attempt to getContext on two different context types. We need to help the HTML5 working group define that. Several people here have stated the difficulties with attempting to render to a single canvas with multiple APIs.
It would be quite useful to this discussion to understand that API better. Have you used it to understand how well it works and where its pitfalls are? Perhaps someone from Opera can enlighten us about the implementation.
Canvas DOESN'T have a model. In the 3 years since Opera created their proprietary API have they gone to the W3C to propose defining multiple contexts in the Canvas element? If so, then we have a basis for discussion. If not, we need to do that definition. My strong recommendation is to disallow multiple contexts.
WebGL fits very well in the Canvas model, as evidenced by 3 implementations (and hopefully soon to be a 4th) on 3 desktop platforms and at least one mobile platform.
I think it's arguable, too, which is why we're arguing :-)
I think it is a bad idea, because there have been experts here that have cautioned against it, and because of my own experience attempting to use multiple graphics APIs on a single surface. But most of all I think it's a bad idea because it would take work to define it and I don't believe we should spend that time in the first release. It's much easier to extend capabilities in a future version than to constrain a feature in the future.