You.i Engine
CYIAssetTextureFramebuffer Class Reference

Detailed Description

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.

See also

#include <asset/YiAssetTextureFramebuffer.h>

Inheritance diagram for CYIAssetTextureFramebuffer:

Public Member Functions

 CYIAssetTextureFramebuffer ()
 CYIAssetTextureFramebuffer (int32_t width, int32_t height, IYIMaterialFactory::ColorSpace colorSpace)
virtual ~CYIAssetTextureFramebuffer ()
virtual std::pair< size_t, size_tGetApproximateSize () const override
- Public Member Functions inherited from CYIAssetTextureBase
 CYIAssetTextureBase (Usage usage=Usage::Static)
virtual ~CYIAssetTextureBase () override
void AddDirtyRegion (const YI_RECT_REL &dirtyRectangle)
void GrowDirtyRegion (const YI_RECT_REL &dirtyRectangle)
void ClearDirtyRegions ()
const std::vector< YI_RECT_REL > & GetDirtyRegions () const
const TextureConfigGetConfiguration () const
virtual int32_t GetWidth () const
virtual int32_t GetHeight () const
IYIMaterialFactory::ColorSpace GetColorSpace () const
void SetConfiguration (const TextureConfig &config)
void SetMinificationFilter (Filtering minFilter=Filtering::Linear, Filtering magFilter=Filtering::Linear)
void SetMipmappingEnabled (bool enable)
bool IsMipmappingEnabled () const
void SetTextureWrap (WrapMode wrapS=WrapMode::ClampToEdge, WrapMode wrapT=WrapMode::ClampToEdge)
virtual bool HasExtendedDimensions () const
Usage GetUsage () const
virtual void ApplyRetainmentPolicy () override
- Public Member Functions inherited from CYIAssetHardware
 CYIAssetHardware ()
virtual ~CYIAssetHardware () override
virtual bool RequestHardwareLoad ()
virtual bool RequestHardwareUnload ()
virtual bool RequestInvalidate ()
virtual bool RequestRestore ()
virtual bool Prepare () override
const std::shared_ptr< IYIGPUObject > & GetGPUObject () const
bool IsLoadedOnGPU () const
RetentionPolicy GetRetentionPolicy () const
void SetRetentionPolicy (RetentionPolicy policy)
- Public Member Functions inherited from CYIAsset
virtual ~CYIAsset ()
const CYIStringGetPath () const
CYIAssetLoadParamsGetLoadParameters () const
bool SetName (const CYIString &name)
const CYIStringGetName () const
bool Load ()
void Unload ()
bool IsLoaded () const
bool Equals (const std::shared_ptr< CYIAsset > &pAsset)

Protected Member Functions

virtual std::shared_ptr< IYIGPUObjectCreateGPUObject () const override
virtual void OnUnload () override
- Protected Member Functions inherited from CYIAssetTextureBase
virtual void DirtyEntireTexture ()
void SetWidth (int32_t width)
void SetHeight (int32_t height)
void SetColorSpace (IYIMaterialFactory::ColorSpace colorSpace)
- Protected Member Functions inherited from CYIAssetHardware
virtual void OnLoad () override
- Protected Member Functions inherited from CYIAsset
 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

- Public Types inherited from CYIAssetTextureBase
enum  Filtering {
enum  WrapMode {
enum  Usage {
- Public Types inherited from CYIAssetHardware
enum  RetentionPolicy {
  RetentionPolicy::Retain = 0,
 The CYIAssetHardware::RetentionPolicy enum specifies the retention policy of static hardware assets from the CPU memory once they are loaded into the GPU memory. More...
- Public Types inherited from CYIAsset
enum  PathType {
  PathType::Absolute = 0,
- Protected Attributes inherited from CYIAssetHardware
bool m_hardwareLoadRequested
std::shared_ptr< IYIGPUObjectm_pGPUObject
RetentionPolicy m_retentionPolicy
- Static Protected Attributes inherited from CYIAsset
static ssize_t INVALID_ID

Constructor & Destructor Documentation

◆ CYIAssetTextureFramebuffer() [1/2]

CYIAssetTextureFramebuffer::CYIAssetTextureFramebuffer ( )

◆ CYIAssetTextureFramebuffer() [2/2]

CYIAssetTextureFramebuffer::CYIAssetTextureFramebuffer ( int32_t  width,
int32_t  height,
IYIMaterialFactory::ColorSpace  colorSpace 

◆ ~CYIAssetTextureFramebuffer()

virtual CYIAssetTextureFramebuffer::~CYIAssetTextureFramebuffer ( )

Member Function Documentation

◆ CreateGPUObject()

virtual std::shared_ptr<IYIGPUObject> CYIAssetTextureFramebuffer::CreateGPUObject ( ) const

Each sub-type must implement this function and returns an IYIGPUObject representing the hardware type.

Implements CYIAssetTextureBase.

◆ GetApproximateSize()

virtual std::pair<size_t, size_t> CYIAssetTextureFramebuffer::GetApproximateSize ( ) const

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.

This function only returns an approximate memory consumption as the exact memory consumption changes depending on the used C++ libraries and on the specific GPU infrastructure and drivers used by the system.

Reimplemented from CYIAsset.

◆ OnUnload()

virtual void CYIAssetTextureFramebuffer::OnUnload ( )

Implements CYIAssetTextureBase.

The documentation for this class was generated from the following file: