Login  Register

Re: TextureRenderer: Could not find PixelFormat

Posted by sranger on May 26, 2015; 3:13pm
URL: https://forum.jogamp.org/TextureRenderer-Could-not-find-PixelFormat-tp4034521p4034525.html

Yes, that looks like the error he was receiving. The default TextureRenderer chooses a GL_BGR/GL_BGRA format without checking if it's acceptable.

If you look in TextureRenderer.init(int width, int height); it uses TYPE_INT_ARGB_PRE if alpha, and TYPE_INT_RGB, if no alpha for the BufferedImage and then in AWTTextureData, it selects GL.GL_RGBA as the internal format in the constructor, but then when it calls AWTTextureData.createFromImage(GLProfile, BufferedImage), it uses GL_BGRA for the GLPixelAttributes object (line 217) which is where it throws the error.

I'm sorry I don't have time at work to debug and test a fix myself but if you need anything else that might help, just let me know.


 - Stephen