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

Glenn Maynard [email protected]
Wed Apr 4 17:43:10 PDT 2012

On Wed, Apr 4, 2012 at 6:43 PM, Kenneth Russell <[email protected]> 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

(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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://khronos.org/pipermail/public_webgl_khronos.org/attachments/20120404/03d043b3/attachment.html>

More information about the public_webgl mailing list