Window
This type specifies a single window that is used to render content into. There can be an arbitrary(-ish) number of windows for each node and they all will be created and initialized at start time. Each window has at least one Viewport that specifies exactly where in the window the rendering occurs with which parameters.
Parameters
Sets the position of the window on the overall desktop space provided by the operating system. This node must have x and y floating point attributes that specify the x-y location of the window. Please note that these values also can be negative on some operating systems. On Windows, for example, the top left corner of the primary monitor is (0,0) in this coordinate system, but there can be additional monitors to the left or the top of the primary monitor, which would require negative numbers. The default values are x=0 and y=0.
Sets the size of the window in pixels. This node must have x and y floating point attributes that determine that size of the window.
Sets the size of the internal framebuffer that is used to render the contents of the window. In a lot of cases, this resolution is the same resolution as the size of the window, but it is a useful tool when creating images that are larger than a window would be support on an operating system. Some operating systems restrict windows to be no larger than what can fit on a specific monitor. This node must have x and y values that determine that size of the window. By default the resolution of the framebuffer is equal to the size of the window.
The numerical identifier of this window. By default windows are given numerical value equal to their position in Window's node list, meaning that the first window of a node will have the id 0, the second window the id 1, etc. This value can be used to overwrite this behavior. It is not allowed to give the same ID to two different windows.
The name of the window. This is also used as the title of the window if window decorations are enabled. The default name for a window if this value is not specified is "SGCT node: %1 (%2)" with %1 the address of this node and %s either "server" or "client", depending on whether the current node is the server or a client in the cluster.
Sets the bit depth and format of the color texture that is used as the render backend for this entire window. The parameters passed into this attribute are converted to the following OpenGL parameters (internal color format and data type) to the texture creation:
8:GL_RGBA8,GL_UNSIGNED_BYTE. This is the default value if nothing else is specified.16:GL_RGBA16,GL_UNSIGNED_SHORT16f:GL_RGBA16F,GL_HALF_FLOAT32f:GL_RGBA32F,GL_FLOAT16i:GL_RGBA16I,GL_SHORT32i:GL_RGBA32I,GL_INT16ui:GL_RGBA16UI,GL_UNSIGNED_SHORT32ui:GL_RGBA32UI,GL_UNSIGNED_INT
Allowed values: 8, 16, 16f, 32f, 16i, 32i, 16ui, 32ui
Determines whether the window should be created in an exclusive fullscreen mode. The size of this window will be used to set the screen resolution if this value is true. See also the monitor attribute to determine which monitor should be used as the target for the fullscreen window. The default value is false.
Determines whether an exclusive fullscreen window will be automatically iconified if it loses focus. This value will be ignored if the fullscreen value is not set or if it is false. The default value for this setting is false.
If this value is set to true, the mouse cursor will never be visible above this window. The default value for this setting is false.
Indicates whether the window is floating, meaning that it is rendered by the operating system always on top of other windows. The default value is false.
Determines whether the content of the window should continue to render even if the window is not visible on screen. Normally, the operating system will not invalidate a window when it is hidden (see hidden attribute) and this attribute can be used to overwrite that behavior. The default behavior is false.
If this value is false, this window will not participate in taking screenshots even if commanded so by the user. This can be useful to prevent auxiliary windows to create screenshots in a production environment.
Determines whether screenshots created from this window should include an alpha channel or not. If this value is false, the resulting image type is RGB, otherwise RGBA. The default is false.
Determines whether multisample antialiasing is used for the window and how many subsamples should be used for the antialiasing. If the value is set to 0, MSAA is disabled. MSAA operates by rendering the scene at a higher resolution using multiple samples per pixel and combining these samples to reduce aliasing. It produces good-looking results, but it increases the rendering time for the scene. The maximum number of samples depends on the GPU that is used to start the application, but is usually around 32. This value should not be used at the same time as fxaa. The default is 0, disabling MSAA.
Determines whether fast approximate antialiasing is used for the contents of this window. This antialiasing is a postprocessing that does not significantly increase rendering time, but the results are not as good as msaa. This value should not be used at the same time as msaa. The default is false.
Enables or disables the window decorations. Window decorations are the title bar that contains the name of the window and buttons to close, maximize or minimize a window. On some operating systems, the window decorations also include a border around a window and potentially shadow effects and the ability to resize the window by dragging the border, all of which can be disabled with this attribute. The default is true.
Enables or disables the ability of the user to change the size of the window. The default is true.
Determines whether the draw2D callback should be called for viewports in this window. In many applications this corresponds to user interface elements that are traditionally rendered in this step. The default value is true.
Determines whether the draw callback should be called for viewports in this window. In many applications, this is the rendering step that creates the 3D scene and renders it to the screen. The default value is true.
If this value is set to false the graphics API will not perform any error checking. This means that any application will run slightly faster but will behave in an undefined manner in case any rendering error do occur.
If this value is specified, the 3D contents of a different window are blitted (=copied) into this window before calling its own rendering. A common use-case for this are GUI windows that want to show the 3D rendering but not take the performance impact of rendering an expensive scene twice. Instead of rendering the 3D scene, a GUI window would set draw3D to false and this attribute to the id of the main window, meaning that the contents of that other window are copied and then the 2D UI will be rendered on top of the blitted content. Unless specified otherwise, a Window's id is the position of the window within a node, starting at 0. So the first window of a node will have the id 0, the second 1, etc. The default value is -1 which means that not blitting is performed.
If this value is set to true, the resulting image of the window will be horizontally mirrored. The default value if it is not specified is false.
If this value is set to true, the resulting image of the window will be vertically mirrored. The default value if it is not specified is false.
Determines which monitor should be used for the exclusive fullscreen in case fullscreen is set to true. The list of monitors on the system are zero-based and range between 0 and the "number of monitors" - 1. For this attribute, the special value -1 can be used to denote that the primary monitor as defined by the operating system should be used, regardless of its index. The default value is -1.
Determines whether the contents of this window should be rendered stereoscopically and which stereoscopic rendering method should be used. The only allowed attribute for this node is the type, which determines the type of stereo rendering. It has to be one of:
none: No stereo rendering is performed. This is the same as if this entire node was not specified. This is the default value if no other is specified.active: Using active stereo using quad buffering. This is only a valid option for systems that support quad buffering.checkerboard: Using a checkerboard pattern for stereoscopy in which left and right eyes are rendered on interleaved checkerboard patterns.checkerboard_inverted: Using the same pattern ascheckerboard, but with the left and right eyes inverted.anaglyph_red_cyan: Applying color filters to the rendering for the left and right eyes such that red-cyan anaglyph glasses can be used to view the stereo content.anaglyph_amber_blue: Applying color filters to the rendering for the left and right eyes such that amber-blue anaglyph glasses can be used to view the stereo content.anaglyph_wimmer: Anaglyph method by Peter Wimmer.vertical_interlaced: A stereo format in which the left and right eye images are interlaced vertically, meaning that each row of the final image is either left or right, switching each row.vertical_interlaced_inverted: The same asvertical_interlaced, but with the left and right eye flipped.dummy: A dummy stereo mode to test streoscopic rendering without needing extra equipment. In this stereo mode, the left and the right eye images are rendered on top of each other without any other processing. This option is available to verify that stereo rendering is working for a specific application.side_by_side: The resolution of the window is split into a left half and a right half, with each eye being rendered into its half. This is a common stereo format for 3D TVs.side_by_side_inverted: The same asside_by_side, but the left and right images are flipped.top_bottom: The same as side_by_side, but instead of separating the window horizontally, the window is split vertically, with the left eye being rendered in the top half of the window and the right image being rendered in the bottom half.top_bottom_inverted: The same astop_bottom, but with the left and right eyes flipped.
Allowed values: none, no_stereo, active, quadbuffer, checkerboard, checkerboard_inverted, anaglyph_red_cyan, anaglyph_amber_blue, anaglyph_wimmer, vertical_interlaced, vertical_interlaced_inverted, test, dummy, side_by_side, side_by_side_inverted, top_bottom, top_bottom_inverted
If this value is specified, a configuration file from Scalable Mesh will be used to fill in many of the values of this window instead, such as the window resolution, location, state of full screen etc. See the specific documentation for Scalable Meshes for more information.