Reading around on the Internet there are a few tidbits I have come across several times, they are:
-
Modern GPUs don’t have hardware support for uncompressed RGB textures. They will be converted to RGBA internally because the GPU doesn’t like 3 component textures.
-
The best transfer format to use (especially on Windows?) is GL_BGRA. If you use GL_RGBA, the driver will have to swizzle your texture data when you call glTexImage2d, slowing the performance.
I’ve read both of those countless places it seems and so I decided to corroborate this by using ARB_internalformat_query2. I did the appropriate glGetInternalformativ calls with GL_INTERNALFORMAT_PREFERRED and GL_TEXTURE_IMAGE_FORMAT. What I got from this was different from what I expected considering the things I read.
According to glGetInternalformativ the internal format used when you ask for GL_RGB8 is GL_RGB8, the optimum transfer format for GL_RGB8 is GL_RGB and the optimum transfer format for GL_RGBA8 is GL_RGBA. So, is what I read outdated, or is my graphics driver lying to me?
I have a AMD HD 5850 and am using the latest drivers with OpenGL 4.3.