Back to main page

Debug

void Debug_PrintGeneralData_OutSB(int MaxCountPerType);

MaxCountPerType should be the maximum number of items that can be printed of the same type. Otherwise the result can get bloated and hard to read.

Prints a general report about what exists in the engine to the string buffer.

int Debug_GetLastNumberOfVisibleLightSources(void);

Returns the number of light sources that passed the view frustum culling test during the last render.

int Debug_GetLastNumberOfCulledLightSources(void);

Returns the number of light sources that failed the view frustum culling test during the last render.

int Debug_GetLastNumberOfVisibleInstances(void);

Returns the number of instances that passed the view frustum culling test during the last render. Invisible instances are not counted.

int Debug_GetLastNumberOfCulledInstances(void);

Returns the number of instances that failed the view frustum culling test during the last render. Invisible instances are not counted.

float Debug_GetPartAllocatedOfDepthAtlas(void);

This should be used after rendering but before clearing shadows so that you are measuring when there are something allocated.

0.0 means that 0% of the depth atlas is used.

0.5 means that 50% of the depth atlas is used.

1.0 means that 100% of the depth atlas is used.

x means that (100 * x)% of the depth atlas is used.

Returns how big part of the depth atlas that is currently allocated.

This should be used after rendering but before clearing shadows because clearing the shadows will remove the data about any denied allocations.

int Debug_WasDepthAtlasAllocationDenied(void);

If a shadowcasting lightsource was denied allocation, it will not cast shadows so that light might leak through walls.

Prevent it by fading away shadows on lesser important light sources using LightSource_SetShadowTransparency, allocating smaller parts of the depth atlas, reducing the total number of shadowcasting light sources.

Returns 1 if a shadowcasting lightsource was denied an allocation to the depth atlas and 0 otherwise.