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

Re: [Public WebGL] Some WebGL draft feedback

Hi Ken,

Without explicit wait calls, every rendering call of every API needs to a test to check if some other context is currently rendering and if so, wait for it. This test will affect performance. It might only be a single if, but it will be in every rendering call. It also means that each rendering API needs to know about all the other APIs that can be used, which in turn means you have to update every API when a new one is added.

And then there is Chris's point, that hiding the synchronization, makes people not realize the impact of their simple change to, e.g., draw a score on their WebGL game using a 2D API.

Having explicit sync. makes it clear to everyone what is going on and keeps the APIs independent of each other.



Kenneth Russell wrote:

All this is why I think our best way forward is (a) for getContext() to return null when trying to create a second rendering API on implementations that do not support simultaneous rendering, and (b) to have explicit sync point calls (waitContext("xxx") as Mark proposes, or similar) for implementations that do. I believe this gives support for simultaneous rendering without the burden of mandating its support. It also allows more flexibility in how simultaneous rendering is implemented.

Agree on point (a). I don't think the explicit wait calls need to be or should be exposed to _javascript_, though. They can be called under the hood when the developer starts rendering with a different context. How would exposing them provide more flexibility to implementations?


fn:Mark Callow
org:HI Corporation;Graphics Lab, Research & Development
adr:Higashiyama 1-4-4, Meguro-ku;;Meguro Higashiyama Bldg 5F;Tokyo;;153-0043;Japan
title:Chief Architect
tel;work:+81 3 3710 9367 x228
tel;fax:+81 3 5773 8660
url:http://www.hicorp.co.jp,  http://www.mascotcapsule.com