For my non regression tests, I want to compare the TextureData of an offscreen chart with TextureData loaded from a png file.
Long time ago I used BufferedImage.getRGB(x,y) but it is AWT dependent and I would prefer to rely on the genericity of JOGL. However I can't find an equivalent of getRGB or getRGBA on TextureData, neither on Texture.
Re: Compare two textures pixelwise (for test purpose)
Administrator
Hi
You can use getBuffer() but such a comparison would work if and only if both instances of TextureData use the same color space, the same pixel format, etc.
You can use getBuffer() but such a comparison would work if and only if both instances of TextureData use the same color space, the same pixel format, etc.
Re: Compare two textures pixelwise (for test purpose)
Administrator
It's currently called ImageHelper. It allowed me to drop AWT typically when I wanted to modify the image data of a texture before sending it anew to the GPU. I'll copy it into JogAmp's Ardor3D Continuation next week.
In my humble opinion, those methods should be moved into JOGL itself, a texture data object should be able to tell which color is in each of its pixels.
In my humble opinion, those methods should be moved into JOGL itself, a texture data object should be able to tell which color is in each of its pixels.