User Tools

Site Tools


en:orx:config:settings_structure:orxviewport

orxVIEWPORT structure

Viewport module. Allows the creation and handling of viewports. Viewports are structures associated to cameras and used for rendering.

Summary

[ViewportTemplate]
TextureList     = Texture1 # ... # TextureN
KeepInCache     = <bool>
Position        = (center) (left | right) (top | bottom) | <vector>
Size            = <vector>
UseRelativeSize = <bool>
BackgroundColor = <vector>
BackgroundAlpha = <float>
Camera          = CameraTemplate
FixedRatio      = <float>
ShaderList      = ShaderTemplate1 # ... # ShaderTemplateN
BlendMode       = alpha | multiply | add | premul | none
AutoResize      = <bool>
NoDebug         = <bool>

Details

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

  • TextureList: Textures used as destination when rendering that viewport. If the specified name doesn't refer to an existing texture, a texture of that name will be automatically created, matching the viewport's dimensions. Defaults to screen when not defined.
  • KeepInCache: If true, the associated textures will always stay in cache. Defaults to false.
  • Position: Literal position (example: top left) or position in pixels, from the top left corner. Defaults to top left.
  • Size: Size in pixels.
  • UseRelativeSize: If true, the viewport size will be interpreted as relative to the underlying texture, using the [0.0 - 1.0] range on both x/y axes. Defaults to false.
  • BackgroundColor: Values are RGB from 0 to 255. Official HTML web color names are also supported. If not set, the viewport won't erase any part of other overlapping viewports that were previously rendered this frame.
  • BackgroundAlpha: If BackgroundColor is set, this value will be used as alpha. Defaults to 1.0.
  • FixedRatio: Only used when no camera is linked, otherwise the aspect ratio of the camera will act as ratio for the viewport. Defaults to none, ie. no fixed ratio is enforced.
  • ShaderList: Defines a list of shaders that will be executed every time this viewport is rendered. Shader will be activated immediately. Up to 4 shaders can be defined. By default, no shader is used.
  • BlendMode: Default value is none, used only when active shaders are attached.
  • AutoResize: Default value is true if no fixed size is given, false otherwise. It's only applicable to viewports with linked textures. If true, viewport's dimension, position and linked textures will be resized/updated upon video mode changes.
  • NoDebug: When set, no debug rendering will happen in this viewport. Defaults to false.
  • 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.

Latest config settings for the Development Version

We endeavor to keep the config properties on this page up to date as often as possible. For up to the minute config information for the latest version of Orx, check the most recent published at:

CreationTemplate.ini and

SettingsTemplate.ini

Additionally these files can be found under your orx source tree in the orx/code/bin folder.

en/orx/config/settings_structure/orxviewport.txt · Last modified: 2023/09/19 23:42 (6 months ago) by sausage