Added support for mipmapping. currently mandatory.