add handling of GL_TEXTURE_RECTANGLE target, and add automatic handling if using it as a sprite