move quartered texture rendering to util class