Go to the documentation of this file.
33 #include "../../GraphicsEngine/interface/RenderDevice.h"
34 #include "../../GraphicsEngine/interface/DeviceContext.h"
35 #include "../../GraphicsEngine/interface/Texture.h"
36 #include "../../../Common/interface/BasicMath.hpp"
41 struct IDynamicTextureAtlas;
44 static const INTERFACE_ID IID_TextureAtlasSuballocation =
45 {0xf7acdcfb, 0x74f, 0x4e31, {0x94, 0xc5, 0xdd, 0x4c, 0x98, 0x8e, 0x45, 0x32}};
50 {0xe1d6fa, 0x47b4, 0x4062, {0xb9, 0x6c, 0xd3, 0xe1, 0x91, 0xa0, 0x23, 0x51}};
struct INTERFACE_ID INTERFACE_ID
Definition: InterfaceID.h:54
virtual const TextureDesc & GetAtlasDesc() const =0
Returns the texture atlas description.
virtual uint2 GetOrigin() const =0
Returns the suballocation origin.
virtual void SetUserData(IObject *pUserData)=0
Stores a pointer to the user-provided data object, which may later be retreived through GetUserData()...
Base interface for all dynamic objects in the engine.
Definition: Object.h:41
Dynamic texture atlas create information.
Definition: DynamicTextureAtlas.h:133
Dynamic texture atlas.
Definition: DynamicTextureAtlas.h:88
virtual ITexture * GetTexture(IRenderDevice *pDevice, IDeviceContext *pContext)=0
Returns the pointer to the internal texture object.
virtual Uint32 GetSlice() const =0
Returns the suballocation slice.
virtual Uint32 GetVersion() const =0
Returns internal texture array version. The version is incremented every time the array is expanded.
Render device interface.
Definition: RenderDevice.h:75
Texture description.
Definition: Texture.h:47
Dynamic texture atlas suballocation.
Definition: DynamicTextureAtlas.h:54
virtual IObject * GetUserData() const =0
Returns the pointer to the user data object previously set with SetUserData() method.
Uint32 SuballocationObjAllocationGranularity
Allocation granularity for ITextureAtlasSuballocation objects.
Definition: DynamicTextureAtlas.h:166
uint32_t Uint32
32-bit unsigned integer
Definition: BasicTypes.h:51
Definition: BasicMath.hpp:74
TextureDesc Desc
Texture description.
Definition: DynamicTextureAtlas.h:139
Uint32 ExtraSliceCount
The number of extra slices.
Definition: DynamicTextureAtlas.h:154
Device context interface.
Definition: DeviceContext.h:1460
virtual IDynamicTextureAtlas * GetAtlas()=0
Returns the pointer to the parent texture atlas.
Uint32 TextureGranularity
Texture region allocation granularity.
Definition: DynamicTextureAtlas.h:147
virtual uint2 GetSize() const =0
Returns the suballocation size.
void CreateDynamicTextureAtlas(IRenderDevice *pDevice, const DynamicTextureAtlasCreateInfo &CreateInfo, IDynamicTextureAtlas **ppAtlas)
Creates a new dynamic texture atlas.
Definition: DynamicTextureAtlas.cpp:410
virtual void Allocate(Uint32 Width, Uint32 Height, ITextureAtlasSuballocation **ppSuballocation)=0
Performs suballocation from the atlas.
Texture inteface.
Definition: Texture.h:273
The library uses Direct3D-style math:
Definition: AdvancedMath.hpp:37
Uint32 MaxSliceCount
Maximum number of slices in texture array.
Definition: DynamicTextureAtlas.h:158
virtual float4 GetUVScaleBias() const =0
Returns the texture coordinate scale (xy) and bias (zw).