class
render::Viewport
Viewport determines to which RenderTarget should rendering be performed.
It allows you to render to a sub-region of the target by specifying the area rectangle, and allows you to set up color/depth/stencil clear values for that specific region.
Public
Methods
GetTarget
SPtr<RenderTarget> GetTarget() const
Returns the render target the viewport is associated with.
SetTarget
Sets the render target the viewport will be associated with.
staticCreate
static SPtr<Viewport> Create(const SPtr<RenderTarget> &target, float x = 0.F, float y = 0.F, float width = 1.F, float height = 1.F)
Creates a new viewport.
~TViewport<IsRenderProxy>
virtual ~TViewport<IsRenderProxy>() = default
Protected
Constructors
Viewport
Viewport(const SPtr<RenderTarget> &target, float x = 0.F, float y = 0.F, float width = 1.F, float height = 1.F)
Methods
GetTargetWidth
u32 GetTargetWidth() const override
Gets the render target width.
GetTargetHeight
u32 GetTargetHeight() const override
Gets the render target width.
SyncFromCoreObject
Update internal data from provided memory buffer that was populated with data from the owning CoreObject.
Fields
mTarget
SPtr<RenderTargetType> mTarget