OffScreenWindowOptionsKit

class HPS::OffScreenWindowOptionsKit : public HPS::Kit

The HPS::OffScreenWindowOptionsKit class is a user space object. It is used to specify off-screen-window-specific options. Calling HPS::OffScreenWindowOptionsKit::GetDefault() will return an options kit with values found in this table.

Public Functions

virtual bool Empty() const

Indicates whether this OffScreenWindowOptionsKit has any values set on it.

Returns

true if no values are set on this OffScreenWindowOptionsKit, false otherwise.

bool Equals(OffScreenWindowOptionsKit const &in_kit) const

Check if the source OffScreenWindowOptionsKit is equivalent to this OffScreenWindowOptionsKit.

Parameters

in_kit – The source OffScreenWindowOptionsKit to compare to this OffScreenWindowOptionsKit.

Returns

true if the objects are equivalent, false otherwise.

inline virtual HPS::Type ObjectType() const

This function returns the type the object, as declared (if the object is derived, this does not give the true type of the derived object).

Returns

The declared type of the object in question, which may differ from the true, underlying type.

OffScreenWindowOptionsKit()

The default constructor creates an empty OffScreenWindowOptionsKit object.

OffScreenWindowOptionsKit(OffScreenWindowOptionsKit &&in_that)

The move constructor creates an OffScreenWindowOptionsKit by transferring the underlying impl of the rvalue reference to this OffScreenWindowOptionsKit thereby avoiding a copy and allocation.

Parameters

in_that – An rvalue reference to an OffScreenWindowOptionsKit to take the impl from.

OffScreenWindowOptionsKit(OffScreenWindowOptionsKit const &in_kit)

The copy constructor creates a new OffScreenWindowOptionsKit object that contains the same settings as the source OffScreenWindowOptionsKit.

Parameters

in_kit – The source OffScreenWindowOptionsKit to copy.

bool operator!=(OffScreenWindowOptionsKit const &in_kit) const

Check if the source OffScreenWindowOptionsKit is not equivalent to this OffScreenWindowOptionsKit.

Parameters

in_kit – The source OffScreenWindowOptionsKit to compare to this OffScreenWindowOptionsKit.

Returns

true if the objects are not equivalent, false otherwise.

OffScreenWindowOptionsKit &operator=(OffScreenWindowOptionsKit &&in_that)

The move assignment operator transfers the underlying impl of the rvalue reference to this OffScreenWindowOptionsKit thereby avoiding a copy.

Parameters

in_that – An rvalue reference to an OffScreenWindowOptionsKit to take the impl from.

Returns

A reference to this OffScreenWindowOptionsKit.

OffScreenWindowOptionsKit &operator=(OffScreenWindowOptionsKit const &in_kit)

Copies the source OffScreenWindowOptionsKit into this OffScreenWindowOptionsKit.

Parameters

in_kit – The source OffScreenWindowOptionsKit to copy.

Returns

A reference to this OffScreenWindowOptionsKit.

bool operator==(OffScreenWindowOptionsKit const &in_kit) const

Check if the source OffScreenWindowOptionsKit is equivalent to this OffScreenWindowOptionsKit.

Parameters

in_kit – The source OffScreenWindowOptionsKit to compare to this OffScreenWindowOptionsKit.

Returns

true if the objects are equivalent, false otherwise.

void Set(OffScreenWindowOptionsKit const &in_kit)

Copies the source OffScreenWindowOptionsKit into this OffScreenWindowOptionsKit.

Parameters

in_kit – The source OffScreenWindowOptionsKit to copy.

OffScreenWindowOptionsKit &SetAntiAliasCapable(bool in_state, unsigned int in_samples = 4)

Sets the anti-alias options for this OffScreenWindowOptionsKit.

Parameters
  • in_state – Whether the associated application window should be anti-alias capable.

  • in_samples – The number of anti-alias samples to use for the associated off-screen window.

Returns

A reference to this OffScreenWindowOptionsKit.

OffScreenWindowOptionsKit &SetDriver(Window::Driver in_driver)

Sets the driver for this OffScreenWindowOptionsKit.

Parameters

in_driver – The driver for this OffScreenWindowOptionsKit.

Returns

A reference to this OffScreenWindowOptionsKit.

OffScreenWindowOptionsKit &SetFramebufferRetention(bool in_retain)

Sets the framebuffer retention option for this OffScreenWindowOptionsKit.

Parameters

in_retain – Whether the associated offscreen window retains the image from the previous frame.

Returns

A reference to this OffScreenWindowOptionsKit.

OffScreenWindowOptionsKit &SetHardwareResident(bool in_state)

Sets whether the image data for this offscreen window should be stored exclusively in video memory. Storing the image in video memory improves the update time but may make the image data inaccessible directly.

Parameters

in_state – Whether the image data for this offscreen window should be stored exclusively in video memory.

Returns

A reference to this OffScreenWindowOptionsKit.

OffScreenWindowOptionsKit &SetNativeFormat(Window::ImageFormat in_format, float in_quality = 1.0f)

Sets the native image format to store data in.

Parameters
  • in_format – Format image data will be stored in.

  • in_quality – The compression quality for the image data (when applicable).

Returns

A reference to this OffScreenWindowOptionsKit.

OffScreenWindowOptionsKit &SetOpacity(bool in_state, float in_opacity = 1.0f)

Sets whether this offscreen window supports opacity in the window background and the opacity value that should be applied when rendering the window background.

Parameters
  • in_state – Whether this offscreen window should support opacity in the window background.

  • in_opacity – The opacity value that will be applied when rendering the window background. The value is clamped if the opacity is outside the range 0 to 1.

Returns

A reference to this OffScreenWindowOptionsKit.

OffScreenWindowOptionsKit &SetOpacity(float in_opacity)

Enables support for opacity in the window background and applies the specified opacity value when rendering the window background.

Parameters

in_opacity – The opacity value that will be applied when rendering the window background.

Returns

A reference to this OffScreenWindowOptionsKit.

OffScreenWindowOptionsKit &SetPreferredGPU(GPU::Preference in_gpu_preference, char const *in_gpu_name = "")

Sets which GPU to use when there are multiple available GPUs on a system. This method is only available when using the DirectX11 driver. Other drivers will ignore this request. in_gpu_name needs to be specified when in_gpu_preference is set to GPU::Preference::Specific. The value passed for in_gpu_name needs to match one of those returned by Database::ShowAvailableGPUs(). If you select something other than default GPU, and Visualize cannot find a GPU which satisfies the requirement, the default GPU

will be used.

All Visualize windows using DirectX11 will use the same

GPU. The user should select the preferred GPU before creating a DirectX11 window. The default is for DirectX11 windows to use HighPerformance GPUs. The Microsoft Basic Software Render Driver is always returned as one of the available GPUs by DirectX11. By selecting it (which users can do by calling SetPreferredGPU(GPU::Preference::Specific, "Microsoft Basic Render Driver")), DirectX11 will run in software mode.

Parameters
Returns

A reference to this OffScreenWindowOptionsKit.

OffScreenWindowOptionsKit &SetScreenAntiAliasing(bool in_state)

Manipulates the state of screen anti-aliasing.

Parameters

in_state – Whether screen anti-aliasing should be used.

Returns

A reference to this object.

void Show(OffScreenWindowOptionsKit &out_kit) const

Copies this OffScreenWindowOptionsKit into the given OffScreenWindowOptionsKit.

Parameters

out_kit – The OffScreenWindowOptionsKit to populate with the contents of this OffScreenWindowOptionsKit.

bool ShowAntiAliasCapable(bool &out_state, unsigned int &out_samples) const

Shows the anti-alias options for this OffScreenWindowOptionsKit.

Parameters
  • out_state – Whether the associated application window should be anti-alias capable.

  • out_samples – The number of anti-alias samples to use for the associated application window.

Returns

true if anti-alias options were set, false otherwise.

bool ShowDriver(Window::Driver &out_driver) const

Shows the driver for this OffScreenWindowOptionsKit.

Parameters

out_driver – The driver for this OffScreenWindowOptionsKit.

Returns

true if a driver was set, false otherwise.

bool ShowFramebufferRetention(bool &out_retain) const

Shows the framebuffer retention setting for this OffScreenWindowOptionsKit.

Parameters

out_retain – The framebuffer retention setting for this OffScreenWindowOptionsKit.

Returns

true if platform specific data was set, false otherwise.

bool ShowHardwareResident(bool &out_state) const

Shows the hardware resident option for this OffScreenWindowOptionsKit.

Parameters

out_state – Whether the image data for this offscreen window should be stored exclusively in video memory.

Returns

true if a hardware resident option was set, false otherwise.

bool ShowNativeFormat(Window::ImageFormat &out_format, float &out_quality) const

Shows the native format option for this OffScreenWindowOptionsKit.

Parameters
  • out_format – Format image data will be stored in.

  • out_quality – The compression quality for the image data (when applicable).

Returns

true if a native format option was set, false otherwise.

bool ShowOpacity(bool &out_state, float &out_opacity) const

Shows the opacity option for this offscreen window

Parameters
  • out_state – Whether this offscreen window supports opacity in the window background.

  • out_opacity – The opacity value that will be applied when rendering the window background.

Returns

true if an opacity option was set, false otherwise.

bool ShowPreferredGPU(GPU::Preference &out_gpu_preference, HPS::UTF8 &out_gpu_name) const

Shows the preference settings for picking a GPU when multiple GPUs are available.

Parameters
  • out_gpu_preference – The preference for picking a GPU when multiple GPUs are available.

  • out_gpu_name – The name of the GPU to use. Only valid when out_gpu_preference is GPU::Preference::Specific

Returns

true if a GPU preference was set, false otherwise.

OffScreenWindowOptionsKit &UnsetAntiAliasCapable()

Removes the anti-alias options for this OffScreenWindowOptionsKit.

Returns

A reference to this OffScreenWindowOptionsKit.

OffScreenWindowOptionsKit &UnsetDriver()

Removes the driver for this OffScreenWindowOptionsKit.

Returns

A reference to this OffScreenWindowOptionsKit.

OffScreenWindowOptionsKit &UnsetEverything()

Removes all settings from this OffScreenWindowOptionsKit.

Returns

A reference to this OffScreenWindowOptionsKit.

OffScreenWindowOptionsKit &UnsetFramebufferRetention()

Removes the framebuffer retention setting for this OffScreenWindowOptionsKit.

Returns

A reference to this OffScreenWindowOptionsKit.

OffScreenWindowOptionsKit &UnsetHardwareResident()

Removes the hardware resident option for this OffScreenWindowOptionsKit.

Returns

A reference to this OffScreenWindowOptionsKit.

OffScreenWindowOptionsKit &UnsetNativeFormat()

Removes the native format option for this OffScreenWindowOptionsKit.

Returns

A reference to this OffScreenWindowOptionsKit.

OffScreenWindowOptionsKit &UnsetOpacity()

Removes the opacity option for this OffScreenWindowOptionsKit.

Returns

A reference to this OffScreenWindowOptionsKit.

OffScreenWindowOptionsKit &UnsetPreferredGPU()

Removes the setting for which GPU should be used when multiple GPUs are available.

Returns

A reference to this OffScreenWindowOptionsKit.

OffScreenWindowOptionsKit &UnsetScreenAntiAliasing()

Removes the screen anti-alias options for this OffScreenWindowOptionsKit.

Returns

A reference to this OffScreenWindowOptionsKit.

virtual ~OffScreenWindowOptionsKit()

Public Static Functions

static OffScreenWindowOptionsKit GetDefault()

Creates an OffScreenWindowOptionsKit which contains the default settings. The returned object will not necessarily have values set for every option, but it will have settings for those options where it is reasonable to have a default.

Returns

An OffScreenWindowOptionsKit with the default settings.

Public Static Attributes

static const HPS::Type staticType = HPS::Type::OffScreenWindowOptionsKit