texture: fix the level parameter to glTexImage2D