Preparing rendering functions.