added mipmap support and automatic anisotropic texture filtering