A Viewport occupies a specified rectangle of a window (range 0 to 1) which renders the 3D scene from the specified eye points looking at the specified screen rectangles.
Values for Idx_EyeOverride.
No eye override, will draw both left and right as required (Symbols - C: "EyeOverrideNone", Lua: __Viewport_EyeOverrideNone)
Drawing is done as mono (Symbols - C: "EyeOverrideMono", Lua: __Viewport_EyeOverrideMono)
Drawing is done only from the left eye (Symbols - C: "EyeOverrideLeft", Lua: __Viewport_EyeOverrideLeft)
Drawing is done only from the right eye (Symbols - C: "EyeOverrideRight", Lua: __Viewport_EyeOverrideRight)
bool - When enabled, viewport is drawn to the screen
vec4f - The viewport bounds, scaled on the screen by the ViewportLayout size. (e.g. layout size 2.0, 1.0, and child viewport width 1.0 will fill half the screen with the viewport)
link - The camera from which the scene is rendered
ProjectionMode (int) - The projection mode
link - (for PhysicalScreen mode) Link to the physical screen for rendering mono
link - (for PhysicalScreen mode) Link to the physical screen for rendering the left eye
link - (for PhysicalScreen mode) Link to the physical screen for rendering the right eye
float - (for other modes) The field of view
float - (for other modes) The physical width of the screen being displayed on (for stereo separation calculations)
vec2f - (for other modes) The screen offset
bool - (for other modes) Whether the viewport is being used in a HMD, which makes the viewport calculation affect the camera transform directly, rather than skewing the projection for wall-based setups
float - (for Orthographic mode) The zoom factor
EyeOverride (int) - Overrides the eye drawn by this viewport
bool - When enabled, viewport is mirrored, which can be helpful for aligning tracker inputs with assemblies
Values for Idx_ProjectionMode.
Projection is defined by eye position and physical screen node (Symbols - C: "ProjectionModePhysicalScreen", Lua: __Viewport_ProjectionModePhysicalScreen)
Projection is defined by eye position, FOV, screen width and HMD flag (Symbols - C: "ProjectionModeFOVAndWidth", Lua: __Viewport_ProjectionModeFOVAndWidth)
Projection is orthographic, from the eye position (Symbols - C: "ProjectionModeOrthographic", Lua: __Viewport_ProjectionModeOrthographic)