A texture frame buffer representing an image in the GPU that can be drawn to.
This frame buffer is a component of a CYIAssetFramebuffer. It can be a color buffer or a depth buffer.
#include <asset/YiAssetTextureFramebuffer.h>
Protected Member Functions | |
virtual std::shared_ptr< IYIGPUObject > | CreateGPUObject () const override |
virtual void | OnUnload () override |
![]() | |
virtual void | DirtyEntireTexture () |
void | SetWidth (int32_t width) |
void | SetHeight (int32_t height) |
void | SetColorSpace (IYIMaterialFactory::ColorSpace colorSpace) |
![]() | |
virtual void | OnLoad () override |
![]() | |
CYIAsset () | |
ssize_t | GetID () const |
void | SetPath (const CYIString &path, PathType pathType) |
void | SetApproximateSize (size_t size) |
void | SetLoaded (bool assetLoaded) |
void | SetLoadParameters (std::unique_ptr< CYIAssetLoadParams > pParams) |
Additional Inherited Members | |
![]() | |
enum | Filtering { Filtering::Linear, Filtering::Nearest } |
enum | WrapMode { WrapMode::ClampToEdge, WrapMode::Mirror, WrapMode::Repeat } |
enum | Usage { Usage::Static, Usage::Dynamic, Usage::RenderTarget } |
![]() | |
enum | RetentionPolicy { RetentionPolicy::Retain = 0, RetentionPolicy::Unload } |
The CYIAssetHardware::RetentionPolicy enum specifies the retention policy of static hardware assets from the CPU memory once they are loaded onto the GPU. It is globally configurable, where new CYIAssetHardware will be making use of it and the can also change directly per assets. Be aware that on some platform, it is best to leave the assets retained on the CPU side when the platform lifecycle has the ability to destroy the graphic context while the app still runs, giving You.i Engine the ability to re-load every assets back onto GPU memory really fast. A good example of such platform would be Android. More... | |
![]() | |
enum | PathType { PathType::Absolute = 0, PathType::Relative } |
![]() | |
bool | m_hardwareLoadRequested |
std::shared_ptr< IYIGPUObject > | m_pGPUObject |
RetentionPolicy | m_retentionPolicy |
![]() | |
static ssize_t | INVALID_ID |
CYIAssetTextureFramebuffer::CYIAssetTextureFramebuffer | ( | ) |
CYIAssetTextureFramebuffer::CYIAssetTextureFramebuffer | ( | int32_t | width, |
int32_t | height, | ||
IYIMaterialFactory::ColorSpace | colorSpace | ||
) |
|
virtual |
|
overrideprotectedvirtual |
Each sub-type must implement this function and returns an IYIGPUObject representing the hardware type.
Implements CYIAssetTextureBase.
|
overridevirtual |
Calculates and returns the approximate number of bytes currently used by this asset. The first item of the returned pair object represents the memory currently taken in the CPU main memory, and the second item of the returned pair object represents the memory currently taken in the GPU memory.
Reimplemented from CYIAsset.
|
overrideprotectedvirtual |
Implements CYIAssetTextureBase.