class ViewportBase

Common base type used for both main and render thread variants of Viewport.

Public

Methods

~ViewportBase

virtual ~ViewportBase() noexcept = default

SetArea

void SetArea(const Area2 &area)

Determines the area that the viewport covers.

Coordinates are in normalized [0, 1] range.

GetArea

Area2 GetArea() const

GetPixelArea

Area2I GetPixelArea() const

Returns the area of the render target covered by the viewport, in pixels.

SetClearFlags

void SetClearFlags(ClearFlags flags)

Determines which portions of the render target should be cleared before rendering to this viewport is performed.

GetClearFlags

ClearFlags GetClearFlags() const

SetClearValues

void SetClearValues(const Color &clearColor, float clearDepth = 0.F, u16 clearStencil = 0)

Sets values to clear color, depth and stencil buffers to.

SetClearColorValue

void SetClearColorValue(const Color &color)

Determines the color to clear the viewport to before rendering, if color clear is enabled.

GetClearColorValue

const Color &GetClearColorValue() const

SetClearDepthValue

void SetClearDepthValue(float depth)

Determines the value to clear the depth buffer to before rendering, if depth clear is enabled.

GetClearDepthValue

float GetClearDepthValue() const

SetClearStencilValue

void SetClearStencilValue(u16 value)

Determines the value to clear the stencil buffer to before rendering, if stencil clear is enabled.

GetClearStencilValue

u16 GetClearStencilValue() const

Protected

Constructors

ViewportBase

ViewportBase(float x = 0.F, float y = 0.F, float width = 1.F, float height = 1.F)

Methods

MarkRenderProxyDataDirtyInternal

virtual void MarkRenderProxyDataDirtyInternal()

Marks the render proxy data as dirty.

This causes the data from the main thread object be synced with the render thread version of the object.

GetTargetWidth

virtual u32 GetTargetWidth() const = 0

Gets the render target width.

GetTargetHeight

virtual u32 GetTargetHeight() const = 0

Gets the render target width.

Fields

mNormArea

Area2 mNormArea

mClearFlags

ClearFlags mClearFlags

mClearColorValue

Color mClearColorValue

mClearDepthValue

float mClearDepthValue

mClearStencilValue

u16 mClearStencilValue