Diligent Engine
Loading...
Searching...
No Matches
Diligent::ITextureAtlasSuballocation Struct Referenceabstract

Dynamic texture atlas suballocation. More...

#include <DynamicTextureAtlas.h>

Inheritance diagram for Diligent::ITextureAtlasSuballocation:
Diligent.IObject

Public Member Functions

virtual uint2 GetOrigin () const =0
 Returns the suballocation origin.
virtual Uint32 GetSlice () const =0
 Returns the suballocation slice.
virtual uint2 GetSize () const =0
 Returns the suballocation size.
virtual float4 GetUVScaleBias () const =0
 Returns the texture coordinate scale (xy) and bias (zw).
virtual Uint32 GetAlignment () const =0
 Returns the suballocation alignment.
virtual Uint32 GetMipLevelCount () const =0
virtual IDynamicTextureAtlasGetAtlas ()=0
 Returns the pointer to the parent texture atlas.
virtual void SetUserData (IObject *pUserData)=0
 Stores a pointer to the user-provided data object.
virtual IObjectGetUserData () const =0
Public Member Functions inherited from Diligent.IObject
virtual void DILIGENT_CALL_TYPE QueryInterface (const INTERFACE_ID &IID, IObject **ppInterface)=0
 Queries the specific interface.
template<typename DerivedType, typename = typename std::enable_if<std::is_base_of<IObject, DerivedType>::value>::type>
void QueryInterface (const INTERFACE_ID &IID, DerivedType **ppInterface)
virtual ReferenceCounterValueType DILIGENT_CALL_TYPE AddRef ()=0
 Increments the number of strong references by 1.
virtual ReferenceCounterValueType DILIGENT_CALL_TYPE Release ()=0
virtual IReferenceCounters *DILIGENT_CALL_TYPE GetReferenceCounters () const =0

Detailed Description

Dynamic texture atlas suballocation.

Member Function Documentation

◆ GetMipLevelCount()

virtual Uint32 Diligent::ITextureAtlasSuballocation::GetMipLevelCount ( ) const
pure virtual

Returns the number of consecutive mip levels, starting at level zero, that can be safely sampled without accessing texels belonging to neighboring suballocations. The count accounts for the actual allocated region placement and extent, the suballocation size, the parent atlas mip count, and compressed-format block dimensions.

◆ GetUserData()

virtual IObject * Diligent::ITextureAtlasSuballocation::GetUserData ( ) const
pure virtual

Returns the pointer to the user data object previously set with SetUserData() method.

Returns
Pointer to the user data object

◆ SetUserData()

virtual void Diligent::ITextureAtlasSuballocation::SetUserData ( IObject * pUserData)
pure virtual

Stores a pointer to the user-provided data object.

The data may later be retrieved through GetUserData().

Parameters
[in]pUserData- Pointer to the user data object to store.
Note
The method is not thread-safe and an application must externally synchronize the access.