Gradients w/o BGRA_PRE
michael at netopyr.com
Mon Feb 23 09:51:13 UTC 2015
thanks for your reply. Right now I do not see anything. PaintHelper.initGradientTextures() eventually calls ES2Texture.create(), which checks if the requested pixel format is supported. This test fails in my case, because WebGL is ES2 only and the extension is not supported. But when I disable this test and pretend that BGRA is RGBA, I see exactly what you describe: the red and the blue channel are swapped.
> On 23 Feb 2015, at 00:55, Jim Graham <james.graham at oracle.com> wrote:
> Hi Michael,
> What error are you seeing, or is it just rendering incorrectly?
> Looking at the code in ES2Texture.uploadPixels() it looks like ES2 might support BGRA via an extension. Perhaps we've only encountered platforms with that extension so far. Otherwise, if I read the code correctly it looks like we will just pretend the incoming data is in RGBA format, which would mean that the rendering would happen, but the red and blue components would be swapped. Is that what you are seeing?
> On 2/21/2015 5:06 AM, Michael Heinrichs wrote:
>> I am experimenting with JavaFX on top of WebGL. Right now I am stuck implementing gradients, but maybe somebody from this list can help.
>> WebGL usually does not support the pixel format BGRA_PRE. From my understanding, the ES2 renderer should work with such a configuration, too. But when I try to use a gradient, at some point PaintHelper.initGradientTextures() is called, which requires the pixel format BGRA_PRE Obviously something about my configuration is wrong. But I cannot figure out, where the alternative implementation resides. How should the implementation of gradients work if BGRA_PRE is not available?
More information about the openjfx-dev