[Public WebGL] How to check for WebGL support

Tony Parisi [email protected]
Thu May 19 11:49:53 PDT 2011


I would caution that we be careful expanding the blacklist for reasons like
this...

Tony

On Thu, May 19, 2011 at 11:38 AM, Benoit Jacob <[email protected]> wrote:

>
>
> ------------------------------
>
> On Thu, May 19, 2011 at 1:37 PM, Vangelis Kokkevis <[email protected]>wrote:
>>
>>  One possible solution would be to define window.WebGLRenderingContext
>> only if both the browser supports WebGL and all the blacklist / user-pref /
>> etc.  tests succeed.
>>
>
> A problem someone pointed out at one point is that browsers (Chrome, as I
> recall) want to be able to update the GPU blacklist at runtime while the
> browser is running, without forcing a browser restart.  However, once you
> expose WebGLRenderingContext to a window, you can't remove it.
>
> Good point; see my isWebGLAvailable() suggestion in the other email I just
> sent --- that would also address that concern.
>
> Benoit
>
>
> I think there's nothing wrong with browsers not exposing WebGL interfaces
> when it's known in advance that WebGL isn't available, but pages still
> couldn't depend on it.  They'd still end up having to create a context to
> check whether it actually works.
>
>
> On Thu, May 19, 2011 at 2:21 PM, Gregg Tavares (wrk) <[email protected]>
> wrote:
> > I guess I don't understand the use case.
> > Either you want to use WebGL in which case you are going to have to call
> canvas.getContext("webgl") with whatever parameters your app needs and see
> if it succeeds.  You have to pay the startup cost since you are using WebGL.
> > If it fails (blacklisted, no webgl) there is no startup cost or shouldn't
> be.
> > Why do you need another way to check?
>
> You may want to grey out or remove WebGL-related features from your site if
> it's known in advance that it's not going to work, instead of presenting the
> user with unusable features.  Not every use of WebGL is something that's
> started up immediately when a page loads.
>
> --
> Glenn Maynard
>
>
>


-- 
Tony Parisi                             [email protected]
CTO at Large                         415.902.8002
Skype                                     auradeluxe
Follow me on Twitter!             http://twitter.com/auradeluxe
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://khronos.org/pipermail/public_webgl_khronos.org/attachments/20110519/412761df/attachment.html>


More information about the public_webgl mailing list