Set up viewport modes.