How much graphics memory is allocated by glTexImage2D/3D


I have a question about
void glTexImage3D ( GLenum target , GLint level , GLenum internalformat , GLsizei width , GLsizei height , GLsizei depth , GLint border , GLenum format , GLenum type , const GLvoid *pixels )

How much memory is allocated in video card by calling glTexImage3D? I am not sure if it depends on “internalformat”. Or, does OpenGL perform the conversion from “format” to “internalformat” once forever and store it in graphics card’s texture memory or do it on the fly?

Thank you in advance.


OpenGL does the conversion from “format” to “internalformat” during upload.