Added a function for generating a variable number of mipmaps on a texture
and another function for toggling whether mipmapping is enabled for a texture.