fixed viewport render function