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

Re: [Public WebGL] WebGLContextAttributes



On Jan 5, 2010, at 2:51 PM, Kenneth Russell wrote:

> On Tue, Dec 29, 2009 at 8:59 AM, Kenneth Russell <kbr@google.com> wrote:
>> On Sat, Dec 26, 2009 at 2:22 PM, Chris Marrin <cmarrin@apple.com> wrote:
>>> 
>>> On Dec 23, 2009, at 5:01 PM, Kenneth Russell <kbr@google.com> wrote:
>>> 
>>>> On Wed, Dec 23, 2009 at 3:48 PM, Chris Marrin <cmarrin@apple.com> wrote:
>>>>> 
>>>>> I believe we did say we would allow a JS object literal to be used.
>>>>> That's why WebGLContextAttributes doesn't have a constructor.
>>>> 
>>>> This is my recollection as well, and it's also the reason the
>>>> NameGetter and NameSetter extended attributes were used. However we
>>>> didn't realize that this would prevent object literals from being
>>>> passed for this argument.
>>> 
>>> So is this just a matter of adding [callback] to the interface definition?
>>> Of so then we should certainly do that. Otherwise there's nothing to prevent
>>> us from allowing an Object literal from being passed and converting it to a
>>> WebGLContextAttributes in the binding. If WebIDL can't describe that we can
>>> add it explicitly to the spec.
>> 
>> As Philip pointed out we also need to remove the NameSetter,
>> NameGetter and NameDeleter extended attributes. In other words, rather
>> than trying to specify it as a dictionary, we need to state which
>> attributes the DOM code will look up via callbacks. This is the IDL
>> which will give us the desired result:
>> 
>>    [Callback] interface WebGLContextAttributes {
>>        attribute boolean alpha;
>>        attribute boolean depth;
>>        attribute boolean stencil;
>>        attribute boolean antialias;
>>        attribute boolean premultipliedAlpha;
>>    };
> 
> 
> Are there any objections to my updating the specification for
> WebGLContextAttributes?


None from me. In fact, I would appreciate it!

-----
~Chris
cmarrin@apple.com




-----------------------------------------------------------
You are currently subscribe to public_webgl@khronos.org.
To unsubscribe, send an email to majordomo@khronos.org with
the following command in the body of your email: