[Public WebGL] Some WebGL draft feedback

Mark Callow [email protected]
Thu Jan 7 18:31:18 PST 2010

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. 
> -----
> ~Chris
> [email protected]
I agree that explicit sync points are needed. To really drive the point 
home that switching between contexts is costly, the sync points should 
be called waitContext("WebGL"), waitContext("2D"), etc. This naming 
reflects what is actually happening. It also happens to be the name used 
in EGL for this functionality: eglWaitAPI.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://khronos.org/pipermail/public_webgl_khronos.org/attachments/20100108/f0cf9f17/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: callow_mark.vcf
Type: text/x-vcard
Size: 398 bytes
Desc: not available
URL: <http://khronos.org/pipermail/public_webgl_khronos.org/attachments/20100108/f0cf9f17/attachment.vcf>

More information about the public_webgl mailing list