[Public WebGL] Some WebGL draft feedback

Vladimir Vukicevic [email protected]
Thu Jan 7 14:36:28 PST 2010


On 1/7/2010 2:26 PM, Chris Marrin wrote:
> I think this is close. But I'm still concerned about the implicit sync point that happens when you call one rendering API after having used the other. I think it will lead to user confusion ("why did things get so much slower when I just added a string of text to the canvas? I guess text rendering is just really slow.") and bad habits. If users do [2D call, 3D call, 2D call, 3D call] it will be very slow but it's not clear why. If they do [enable2D, 2D call, enable3D, 3D call, enable2D, 2D call, enable3D, 3D call], it will be much more clear that the better approach is [enable 2D, 2D call, 2D call, enable 3D, 3D call, 3D call]. It is a more purposeful API and is more helpful to authors.
>
> As Kenneth Waters pointed out, we don't NEED to have a synch mechanism, but I think it makes a better API. But I also agree that using getContext() for this unnecessarily overloads that call, so an explicit enable(...) call would be better.

I still don't like having multiple contexts on <canvas> at all, even 
with explicit sync points.  It complicates implementation for not much 
benefit, given that the implementation will almost certainly have to do 
something similar to what the user would already be able to do (copy the 
framebuffer contents around), but with added complexity -- having to 
keep the GL context and all associated objects around, for example.

     - Vlad

-----------------------------------------------------------
You are currently subscribe to [email protected]
To unsubscribe, send an email to [email protected] with
the following command in the body of your email:




More information about the public_webgl mailing list