SimulatedHighDPIViewer

MacroModule
author Felix Ritter
package FMEwork/ReleaseMeVis
definition SimulatedHighDPIViewer.def
see also SoExaminerViewer
keywords viewer, high-dpi, high-resolution

Purpose

The SimulatedHighDPIViewer helps in testing resolution-independent visualization modules. It renders a larger offscreen view into the viewer by displaying a shrunken image of the rendered scenegraph. The size of the image can be specified using the Pixel Scale multiplier field. For instance, a value of 2 will simulate the display of a Retina Display MacBook Pro on any regular display while a value of 1 will simulate a regular display on a Retina Display MacBook Pro.

Windows

Viewer

../../../Modules/Macros/Viewers/mhelp/Images/Screenshots/SimulatedHighDPIViewer.Viewer.png

Settings

../../../Modules/Macros/Viewers/mhelp/Images/Screenshots/SimulatedHighDPIViewer.Settings.png

Input Fields

child

name: child, type: SoNode, deprecated name: inImage

Input of the child graph that should be viewed in high DPI.

Output Fields

self (hidden)

name: self, type: SoNode

(Hidden) output of the emulated high DPI rendering.

Parameter Fields

Field Index

Emulate Events: Bool
Internal Image Height: Integer
Internal Image Width: Integer
Mode: Enum
Pixel Scale: Integer

Visible Fields

Pixel Scale

name: pixelScale, type: Integer, default: 1, minimum: 1, maximum: 9

The value of this field is used as multiplier to the viewport size of the viewer.

Internal Image Width

name: imageWidthOut, type: Integer, persistent: no

Output of the internal high DPI resolution (width).

Internal Image Height

name: imageHeightOut, type: Integer, persistent: no

Output of the internal high DPI resolution (height).

Mode

name: mode, type: Enum, default: FramebufferSampler

Defines if and how the high resolution is simulated.

Values:

Title Name Description
Framebuffer Sampler FramebufferSampler This uses the SoFramebufferSampler2D which allows for a real time rendering without any delay. It might not work on certain modules however (SoViewportRegion with delayed rendering, for example).
Offscreen Renderer OffscreenRenderer This uses the OffscreenRenderer which allows to render most modules. However, interactions and resizing might be slightly delayed. Also, interaction does not work well if a SoViewportRegion with absolute pixel values is used in the scene graph. Should only be used if the content of the scene graph cannot be correctly displayed in FramebufferSampler mode!
Bypass Bypass Renders the input directly without emulating high DPI.

Emulate Events

name: emulateEvents, type: Bool, default: TRUE

Enables emulation of events in high DPI resolution. If mode is set to Bypass, events are simply forwarded.