what i do is create a texture with a specific internal format eg GL_RGB4 .
and then i query the internal format like so
GLint format;
glGetTexLevelParameteriv(GL_TEXTURE_2D,0,GL_TEXTURE_INTERNAL_FORMAT,&format);
i get back the right answer GL_RGB4
now if i load + draw someit with
GL_RGB4 and GL_RGBA4 they should look the same on the screen right? ie they both use the same number of bits 4 for the rgb data.
but they look different. GL_RGB5_A1 though looks the same as GL_RGB4. i notice the spec saiz that gl is only required to choose an approxiament internal representation of what u ask for but surely when i use this glGetTexLevelParameteriv it’ll return the true internal representation + not the one that i asked for