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

Re: [Public WebGL] another proposal to temporarily expose some device/driver information only when really needed



On Wed, May 9, 2012 at 5:51 AM, Thor Harald Johansen <thj@thj.no> wrote:
>>> How about adding a flag (false by default) that allows an acquired
>>> context to be queried and configured before activation?
>>
>>
>> That is what the {async:true} flag is going to be, once we have specified
>> and implemented async context creation.
>
>
> Ah! You're referring to what I'd call a "non-blocking" call, then? With
> things like node.js being all the rage, "asynchronous" has kind of come to
> mean "event callback" to many developers.
>
> Even "non-blocking" isn't a very good term. The main benefit here is not the
> speed of the call, but the delayed resource creation that allows for
> additional setup. I am struggling to find a good word for the concept,
> really. It's not really asynchronous if it synchronizes with the first call
> that requires hardware resources, is it...

"Lazy"? <http://en.wikipedia.org/wiki/Lazy_evaluation>

> Still, is there actually a need for an explicit flag? Neither the programmer
> nor the end user is going to see a visual difference between "no resources
> allocated yet" vs "nothing rendered yet". My original point was that it
> seems entirely possible to allow the following:
>
>
> var gl = canvas.getContext("webgl");
> var caps = gl.getDeviceCaps();
> gl.enableSomeCap();
>
> var buffer = gl.createBuffer(); // HW context auto-created here
> ...
> ...
>
> ...and then drop passing flags into getContext() altogether?
>
> Thor

-----------------------------------------------------------
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
-----------------------------------------------------------