engine renderloop run at the beginning