partial revert of 8a6f7474088e texture_rect isn't in core 3.0, so the long texture function must be used