Make generic quad rendering function