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

Re: [Public WebGL] What should getContextAttributes return after the context has been lost?



On Wed, Apr 4, 2012 at 5:43 PM, Glenn Maynard <glenn@zewt.org> wrote:
> On Wed, Apr 4, 2012 at 6:43 PM, Kenneth Russell <kbr@google.com> wrote:
>>
>> Agreed, getContextAttributes should never return null. Added explicit
>> context lost handling for this method and documented what it does.
>> Please post if you see any issues with this edit.
>
>
> "or the default values if no context has ever been created."
>
> Can this ever happen?  If the context was never created, then you wouldn't
> have a WebGLRenderingContext to call this function on in the first place.

I'm thinking a bit forward to the situation where an "async" bit is
added to the context creation attributes, and the context is created,
but in the lost state. This is one of the changes on the table for the
current version of the spec in development, and one which I expect
will be added reasonably soon after discussion on this list.

It's reasonable feedback to defer adding this wording until the async
bit is actually added, so if you think the text should be simplified,
please reply and I'll simplify it.

-Ken


> I think the first sentence is enough: "Returns a new WebGLContextAttributes
> object describing the context creation parameters."  The context creation
> parameters are still there when the context is lost, so it doesn't need
> special steps if the context is lost.  5.15.2 doesn't say anything like "set
> the context creation parameters to null".
>
> Actually, since the context creation parameters *are* a
> WebGLContextAttributes, simply: "Return a new copy of context creation
> parameters."
>
> (It's confusing having a term like "context creation parameters" be a plural
> phrase, when it's a singular concept--a WebGLContextAttributes object.  I've
> been trying to think of a singular term; "context creation configuration" is
> a bit of a mouthful...)
>
> --
> Glenn Maynard
>
>

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