modularize quad rendering a bit more