dir and viewport constants.