Open mludlum opened 3 years ago
OpenGL ES 3.2 doesn't have a BGR format in it's standard. There is EXT_texture_format_BGRA8888
which gets you a BGR format in OpenGL ES, though I don't know how available it is.
If you don't want to use that extension you can swizzle the bytes yourself and hopefully the internal storage on GL ES devices is in RGB order so that the driver doesn't need to do unnecessary work swizzling the bytes.
Thanks for the reply. Do you have a pairing for the last parameter of LockBits and the 3rd 7th parameters of TexImage2D that work for a transparent png?
Are you looking for a GL ES answer or just a normal GL answer?
GL ES please
How do I map System.Drawing.Imaging.PixelFormat to opentk.graphics.es30.pixelFormat? I can't find an example that uses ES30 when going from a call to Bitmap.LockBits to a call to GL.TexImage2D. I want my OpenTK code to work on mobile devices. I have a png that is a color gradient that I'm using to texture triangles using a shader with a texture. PixelFormat.Brga is not available, and the ES30 PixelFormat.Rgba doesn't seem to work.