fix mipmap allocation in opengl version