I was confused about the memory usage increase after calling ‘glTexImage2D’ function with the following different arguments when profiling the OpenGL demo. The graphic memory usage increased by 64MB when I passed not only GL_RGBA8 as internalFormat but also GL_RGBA4. Anyone knows why they are the same?
glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA8, 4096, 4096, 0, GL_RGB, GL_UNSIGNED_BYTE, data); // Graphics memory increased by 64MB
glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA4, 4096, 4096, 0, GL_RGB, GL_UNSIGNED_BYTE, data); // Graphics memory increased by 64MB
glTexImage2D(GL_TEXTURE_2D, 0, GL_RGB4, 4096, 4096, 0, GL_RGB, GL_UNSIGNED_BYTE, data); // Graphics memory increased by 32MB
glTexImage2D(GL_TEXTURE_2D, 0, GL_RGB5_A1, 4096, 4096, 0, GL_RGB, GL_UNSIGNED_BYTE, data); // Graphics memory increased by 32MB