class GUIRenderTexture

Inherits: GUITexture

Allows you to display a render texture in the GUI.

Has the same functionality as GUITexture, but also forwards any input to underlying GUI elements being rendered on the provided render texture.

Public

Methods

staticGetGuiTypeName

static const String &GetGuiTypeName()

Returns type name of the GUI element used for finding GUI element styles.

staticCreate

static GUIRenderTexture *Create(const SPtr<RenderTexture> &texture, bool transparent, const String &styleName = StringUtility::kBlank)

Creates a new element with the provided render texture.

texture
Render texture to display.
transparent
Determines should the texture be rendered with transparency active.
styleName
Optional style to use for the element. Style will be retrieved from GUISkin of the GUIWidget the element is used on. If not specified default style is used.

staticCreate

static GUIRenderTexture *Create(const SPtr<RenderTexture> &texture, bool transparent, const GUIOptions &options, const String &styleName = StringUtility::kBlank)

Creates a new element with the provided render texture.

texture
Render texture to display.
transparent
Determines should the texture be rendered with transparency active.
options
Options that allow you to control how is the element positioned and sized. This will override any similar options set by style.
styleName
Optional style to use for the element. Style will be retrieved from GUISkin of the GUIWidget the element is used on. If not specified default style is used.

staticCreate

static GUIRenderTexture *Create(const SPtr<RenderTexture> &texture, const String &styleName = StringUtility::kBlank)

Creates a new element with the provided render texture.

texture
Render texture to display.
styleName
Optional style to use for the element. Style will be retrieved from GUISkin of the GUIWidget the element is used on. If not specified default style is used.

staticCreate

static GUIRenderTexture *Create(const SPtr<RenderTexture> &texture, const GUIOptions &options, const String &styleName = StringUtility::kBlank)

Creates a new element with the provided render texture.

texture
Render texture to display.
options
Options that allow you to control how is the element positioned and sized. This will override any similar options set by style.
styleName
Optional style to use for the element. Style will be retrieved from GUISkin of the GUIWidget the element is used on. If not specified default style is used.

SetRenderTexture

void SetRenderTexture(const SPtr<RenderTexture> &texture)

Changes the active render texture whose contents to display in the GUI element.

Protected

Constructors

GUIRenderTexture

GUIRenderTexture(const String &styleName, const SPtr<RenderTexture> &texture, bool transparent, const GUISizeConstraints &dimensions)

Methods

~GUIRenderTexture

virtual ~GUIRenderTexture() noexcept

UpdateRenderElements

void UpdateRenderElements() override

Recreates the internal render elements.

Must be called before GetRenderElementVertexAndIndexData/FillBuffer if element is dirty. Marks the element as non dirty.

Fields

mSourceTexture

SPtr<RenderTexture> mSourceTexture

mTransparent

bool mTransparent