Documentation

SpeedTree Runtime SDK

Version: 10

SpeedTree Runtime SDK

Version: 10

Tracking resource usage

Learn how to query internal resource usage in the Runtime SDK.
Read time 1 minuteLast updated 2 hours ago

The SpeedTree Runtime SDK provides a straightforward mechanism for querying the space used by several internal resources.

Using the system

The Runtime SDK function
CCore::GetSdkResourceUsage()
can be called at any time. It will populate and return the following
SResourceSummary
structure:
struct SResourceSummary{ SResourceStats m_sHeap; SResourceStats m_asGfxResources[GFX_RESOURCE_COUNT]; // indexed with EGfxResourceType};
Where
SResourceStats
is defined as:
struct SResourceStats{ size_t m_siCurrentUsage; // bytes size_t m_siPeakUsage; // bytes size_t m_siCurrentQuantity; size_t m_siPeakQuantity;};
SResourceSummary::m_asGfxResources
is indexed with the enumeration
EGfxResourceType
, also defined in
Core.h
:
enum EGfxResourceType{ GFX_RESOURCE_VERTEX_BUFFER, GFX_RESOURCE_INDEX_BUFFER, GFX_RESOURCE_VERTEX_SHADER, GFX_RESOURCE_PIXEL_SHADER, GFX_RESOURCE_TEXTURE, GFX_RESOURCE_OTHER, GFX_RESOURCE_COUNT};