refactoring: move several render setup commands into static local functions.

Signed-off-by: Kim Kulling <kim.kulling@googlemail.com>