The documentation indicates that this \"allocates\" storage for a texture and its levels. The pseudocode provided seems to indicate that this is for the mipmap levels.
Before calling glGenerateMipmap, the base mipmap level must be established. (either with mutable or immutable storage).so...,you can using glTexImage2D+glGenerateMipmap only,more simple!