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

Re: [Public WebGL] Bug in context-lost.html conformance test: getContextAttributes should not return null



Yes, we can actually. Ideally we can call

var gl = canvas.getContext("webgl");

and the context is already lost.  isContextLost() returns true and the contextlostevent will be delivered once the current event exits

Note, the samples on the WebGL wiki and the ones on webglsamples.googlecode.com all handle this case.

That does bring up a good point as to why getContextAttrbutes should maybe return null during contextlost. I know that sucks though since you have to be defensive about accessing it but I don't know what it could report since there is no context to give attributes about.



On Thu, Oct 25, 2012 at 11:05 AM, Boris Zbarsky <bzbarsky@mit.edu> wrote:

On 10/25/12 1:38 PM, Gregg Tavares (社用) wrote:
Off the top of my head I'd say returning the lost context's attributes
is fine?

Can we never be in a lost-context state without having created a context at any point?


-Boris

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