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

Re: [Public WebGL] How to handle partially failing getContext()



> I have been inspecting a bug in our app where Intel HD GPUs will just
> render a black screen when using Chrome 12 in win7. Firefox seems to
> blacklist this GPU.

I have the exact same problem - but in my case, the program works just
fine in FireFox.  I'm using a fairly recent Toshiba netbook with Win7
Starter edition and a pre-installed Chrome 10.  However, Chrome 11 also
fails.  I didn't get around to trying 12.

> The problem is triggered by calling getContext() with 'alpha' attrib
> set to false (I want opaque composition).

Yep...me too.

> In that case the
> getContext() returns a valid context and sets webgl error to "invalid
> argument". Any rendering with that context will result a black
> rectangle on screen. If I set alpha to true, I can see that the
> rendering is correct, but the composition is of course different too.

You can work around that by clearing the alpha to opaque - then setting
the write mask to disable writes to alpha.  I'll try that on my program
tomorrow.

> It is not clear to me based on the spec if that is correct behavior or
> a bug.

It's likely to be a bug - my software works perfectly on other browsers,
other GPU's and other OS's - both under ANGLE and OpenGL.

> The spec says that the attributes should not cause the
> getContext() to fail, but should I test for webgl error and retry? The
> spec states that I cannot change the attribs on second try, though.

Right - you should always get a rendering context of some kind - even if
it's not what you asked for.  I'm also getting a WebGL error set when I do
a <canvas> resize - which isn't even a WebGL operation.

It's useful to know that I can work around it by creating an alpha plane
though.

  -- Steve



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