move more rendering functions into engine class