User Tools

Site Tools


en:orx:config:settings_structure:orxviewport

This is an old revision of the document!


orxVIEWPORT structure

Summary

[ViewportTemplate]
BackgroundClear  = <bool>
BackgroundColor  = <vector>
Camera           = CameraTemplate;
RelativePosition =  left | right | top | bottom
Position         = <vector>
RelativeSize     = <vector>
Size             = <vector>
ShaderList       = ShaderTemplate1#ShaderTemplate2
Texture          = path/to/TextureFile

Details

Here's a list of the available properties for an orxVIEWPORT structure:

  • BackgroundClear: Specifies if the background should be cleared before rendering it. Its default value is true.
  • BackgroundColor: Defines which color will be used for clearing the viewport before rendering it. Its default value is black (0, 0, 0).
  • Camera: Template name of the camera that will be linked to this viewport. Each camera template will correspond to a unique camera at runtime. This means that if you use more than one viewport linked to the same camera, they will render the same content as seen by this camera.
  • RelativePosition: Defines where the viewport will be placed in the main display. It should be a combination of two attributes. Ex.: top left to have your viewport in the top left corner. Its default value is top left.
  • Position: Defines an absolute position for the viewport in the main display, in pixel coordinates. This value is only used if none is provided for RelativePosition.
  • RelativeSize: Defines the viewport size relatively to the main display's one, ie. (1, 1, 0) means that it will cover the full display. Its default value is (1, 1, 0) 1).
  • Size: Defines the absolute viewport size, in pixels. This value is only used if none is provided for RelativeSize.
  • Texture: Defines a texture where the viewport will be rendered. Its default value is the main display (ie. screen). NB: orx's default display plugin based on SFML doesn't support this property.
  • ShaderList: Defines a list of shaders that will be executed every time this viewport is rendered. Up to 4 shaders can be specified. By default, no shader is used.
1)
the Z component is ignored
en/orx/config/settings_structure/orxviewport.1253620997.txt.gz · Last modified: 2017/05/30 00:50 (8 years ago) (external edit)