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

Re: [Public WebGL] WebGLContextAttributes



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?

-Ken


>>>
>>>> Speaking of which, someone mentioned that we should be using the
>>>> "editor's draft" of the WebIDL spec. But I can't find such a thing. Seems
>>>> like WebIDL should be able to describe generic containers (Objects), since
>>>> it can (at last viewing) supports sequences (Arrays).
>>>
>>> It's what Philip pointed to above:
>>>
>>> http://dev.w3.org/2006/webapi/WebIDL/
>>>
>>
>> Ah. That was confusing since the URL has 2006 in it. Also when you search
>> for "webidl spec" you get the one from 2008. We should add a link to the
>> proper webidl spec to ours.
>
> I've added a link in the Normative References section, but haven't
> referred to it from elsewhere in the text yet. We need to update the
> syntax of the extended attributes and perhaps other places in the
> WebGL IDL to make it compliant with the current WebIDL draft spec.
>
> -Ken
>

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