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