Defines an offscreen target for the rendering results to be sent to.
Offscreen types will be rendered into framebuffer objects that can be used, after rendering, as textures.
For an offscreen target, even though it would be possible to calculate target dimensions based on the union of the bounding boxes of the children, it is better to set it directly by the specified AE composition size. Once this target is created, its dimensions will not change.
#include <renderer/YiOffscreenRenderTarget.h>
Public Member Functions | |
~CYIOffscreenRenderTarget () | |
void | SetFramebufferAsset (const std::shared_ptr< CYIAssetFramebuffer > &pFramebuffer) |
void | SetTargetSize (uint32_t width, uint32_t height) |
![]() | |
virtual | ~CYIRenderTarget () |
void | SetViewport (const CYIViewport &viewport) |
const CYIViewport & | GetViewport () const |
std::shared_ptr< IYIGPUObject > | GetFramebuffer () const |
std::shared_ptr< CYIAssetFramebuffer > | GetFramebufferAsset () const |
Type | GetTargetType () const |
void | SetDeviceHorizontalPixelRatio (float devicePixelRatio) |
void | SetDeviceVerticalPixelRatio (float devicePixelRatio) |
void | SetDeviceDiagonalPixelRatio (float devicePixelRatio) |
float | GetDeviceHorizontalPixelRatio () const |
float | GetDeviceVerticalPixelRatio () const |
float | GetDeviceDiagonalPixelRatio () const |
void | SetClearColor (const CYIColor &clearColor) |
const CYIColor & | GetClearColor () const |
void | SetAttribute (Attribute attribute, bool value) |
bool | GetAttribute (Attribute attribute) const |
Friends | |
class | CYIRenderTarget |
class | CYISceneBuilder |
Additional Inherited Members | |
![]() | |
enum | Attribute { Attribute::None = 0x00, Attribute::ClearColorBuffer = 0x01, Attribute::ClearDepthBuffer = 0x02, Attribute::ClearAll = ClearColorBuffer | ClearDepthBuffer } |
enum | Type { Type::Screen = 1, Type::OffscreenColorOnly, Type::OffscreenDepthOnly, Type::OffscreenColorAndDepth } |
![]() | |
static std::unique_ptr< CYIScreenRenderTarget > | CreateScreenTarget (const CYIViewport &viewport) |
static std::unique_ptr< CYIOffscreenRenderTarget > | CreateOffscreenTarget (Type targetType, uint32_t targetWidth, uint32_t targetHeight) |
![]() | |
CYIRenderTarget () | |
![]() | |
std::shared_ptr< CYIAssetFramebuffer > | m_pFramebuffer |
CYIOffscreenRenderTarget::~CYIOffscreenRenderTarget | ( | ) |
void CYIOffscreenRenderTarget::SetFramebufferAsset | ( | const std::shared_ptr< CYIAssetFramebuffer > & | pFramebuffer | ) |
Sets the framebuffer asset for this render target. This will be the destination buffer to which content will be rendered.
void CYIOffscreenRenderTarget::SetTargetSize | ( | uint32_t | width, |
uint32_t | height | ||
) |
Updates the target size for offscreen targets.
|
friend |
|
friend |