gl: BGRA formats need a different internal format
In GLES, BGRA is still done by GL_EXT_texture_format_BGRA8888 which is an extension that is older than GLES 2.0.
And back then, internal formats had to be specified unsized. And when that was changed with GLES3, nobody updated the extension. However, on OpenGL, this extension doesn't exist, and internal formats need to be sized.
So let's use different internal formats depending on GL version.
Fixes #6333 (closed)