All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
kzu_hud.h File Reference

Heads up display for displaying debug information. More...

Namespaces

 kanzi
 

Macros

#define KZU_HUD_RENDER_FLAG_FPS
 HUD render flag for displaying FPS number. More...
 
#define KZU_HUD_RENDER_FLAG_BATCH_COUNT
 HUD render flag for displaying number of batches. More...
 
#define KZU_HUD_RENDER_FLAG_TRIANGLE_COUNT
 HUD render flag for displaying number of triangles. More...
 
#define KZU_HUD_RENDER_FLAG_TEXTURE_SWITCHES
 HUD render flag for displaying number of texture switches. More...
 
#define KZU_HUD_RENDER_FLAG_SHADER_SWITCHES
 HUD render flag for displaying number of shader switches. More...
 
#define KZU_HUD_RENDER_FLAG_VIEW_CAMERA
 HUD render flag for displaying the name of the view camera. More...
 
#define KZU_HUD_RENDER_FLAG_ANIMATION_TIME
 HUD render flag for displaying time spent for animations. More...
 
#define KZU_HUD_RENDER_FLAG_MEMORY_CONSUMPTION
 HUD render flag for displaying memory consumption. More...
 
#define KZU_HUD_RENDER_FLAG_FRAME_BUFFER_SWITCHES
 HUD render flag for displaying FBO switches. More...
 
#define KZU_HUD_RENDER_FLAG_BUFFER_SWITCHES
 HUD render flag for displaying buffer (VBO + IBO) switches. More...
 
#define KZU_HUD_RENDER_FLAG_HEAVYWEIGHT_CALLS
 HUD render flag for displaying heavyweight call count (buffer[sub]data, tex[sub]image2d). More...
 

Functions

kzsError kzuHudCreate (const struct KzcMemoryManager *memoryManager, struct KzuHud **out_hud)
 Create a new hud. More...
 
kzBool kzuHudIsInitialized (const struct KzuHud *hud)
 Is HUD initialized, i.e. More...
 
kzsError kzuHudCreateResources (struct KzuHud *hud, kanzi::Domain *domain, struct KzuBitmapFontSystem *fontSystem)
 Initialize resources in hud. More...
 
kzsError kzuHudDelete (struct KzuHud *hud)
 Delete a hud context. More...
 
kzsError kzuHudUpdate (struct KzuHud *hud, kzFloat fps, kzUint batchCount, kzUint triangleCount, kzUint textureSwitchCount, kzUint frameBufferSwitchCount, kzUint shaderSwitchCount, kzUint uniformsSent, kzUint bufferSwitchCount, kzUint heavyweightCallCount, kzString viewCameraPath, kzFloat animationPlayerTime, kzUint resourceVramConsumption, kzUint resourceRamConsumption)
 Updates hud. More...
 
kzsError kzuHudAddCustomTextLine (struct KzuHud *hud, kzString customString)
 Adds custom text line to HUD. More...
 
kzsError kzuHudRenderDebugInfo (const struct KzuHud *hud, kanzi::Renderer3D *renderer, const struct KzcMemoryManager *quickMemoryManager, const struct KzcVector2 *offset, const struct KzcVector2 *limits, kzBool backgroundToDynamicText)
 Render the hud. More...
 
kzsError kzuHudRenderLog (const struct KzuHud *hud, const kanzi::Renderer3D *renderer, const struct KzcMemoryManager *quickMemoryManager, const struct KzcVector2 *offset, const struct KzcVector2 *limits)
 Render the log. More...
 
kzsError kzuHudDrawText (struct KzuFont *font, const struct KzuTextLayouter *textLayouter, const struct KzcMemoryManager *memoryManager, kanzi::Renderer *renderer, kzString text, kzFloat x, kzFloat y, kzBool isOutlinedShadow, kzFloat *out_ySpace)
 Draws single text line. More...
 
kzsError kzuHudRenderAnimationPlayerInfo (const struct KzuHud *hud, kanzi::Renderer3D *renderer, const struct KzcMemoryManager *quickMemoryManager, const struct KzcVector2 *offset, const struct KzcVector2 *limits, const struct KzuAnimationPlayer *rootAnimationPlayer)
 Render the animation player info. More...
 
void kzuHudSetLogVisualizationEnabled (struct KzuHud *hud, kzBool enabled)
 Sets log visualization enabled in hud. More...
 
kzBool kzuHudIsLogVisualizationEnabled (const struct KzuHud *hud)
 Returns if log visualization is enabled on HUD. More...
 
void kzuHudSetRenderFlags (struct KzuHud *hud, kzU32 flags)
 Sets render flags for hud. More...
 
struct KzuFontkzuHudGetFont (const struct KzuHud *hud)
 Gets the default font from hud. More...
 

Detailed Description

Heads up display for displaying debug information.

Copyright 2008-2020 by Rightware. All rights reserved.

Macro Definition Documentation

#define KZU_HUD_RENDER_FLAG_FPS

HUD render flag for displaying FPS number.

#define KZU_HUD_RENDER_FLAG_BATCH_COUNT

HUD render flag for displaying number of batches.

#define KZU_HUD_RENDER_FLAG_TRIANGLE_COUNT

HUD render flag for displaying number of triangles.

#define KZU_HUD_RENDER_FLAG_TEXTURE_SWITCHES

HUD render flag for displaying number of texture switches.

#define KZU_HUD_RENDER_FLAG_SHADER_SWITCHES

HUD render flag for displaying number of shader switches.

#define KZU_HUD_RENDER_FLAG_VIEW_CAMERA

HUD render flag for displaying the name of the view camera.

#define KZU_HUD_RENDER_FLAG_ANIMATION_TIME

HUD render flag for displaying time spent for animations.

#define KZU_HUD_RENDER_FLAG_MEMORY_CONSUMPTION

HUD render flag for displaying memory consumption.

#define KZU_HUD_RENDER_FLAG_FRAME_BUFFER_SWITCHES

HUD render flag for displaying FBO switches.

#define KZU_HUD_RENDER_FLAG_BUFFER_SWITCHES

HUD render flag for displaying buffer (VBO + IBO) switches.

#define KZU_HUD_RENDER_FLAG_HEAVYWEIGHT_CALLS

HUD render flag for displaying heavyweight call count (buffer[sub]data, tex[sub]image2d).

Function Documentation

kzsError kzuHudCreate ( const struct KzcMemoryManager memoryManager,
struct KzuHud **  out_hud 
)

Create a new hud.

kzBool kzuHudIsInitialized ( const struct KzuHud hud)

Is HUD initialized, i.e.

is font system set.

kzsError kzuHudCreateResources ( struct KzuHud hud,
kanzi::Domain domain,
struct KzuBitmapFontSystem fontSystem 
)

Initialize resources in hud.

kzsError kzuHudDelete ( struct KzuHud hud)

Delete a hud context.

kzsError kzuHudUpdate ( struct KzuHud hud,
kzFloat  fps,
kzUint  batchCount,
kzUint  triangleCount,
kzUint  textureSwitchCount,
kzUint  frameBufferSwitchCount,
kzUint  shaderSwitchCount,
kzUint  uniformsSent,
kzUint  bufferSwitchCount,
kzUint  heavyweightCallCount,
kzString  viewCameraPath,
kzFloat  animationPlayerTime,
kzUint  resourceVramConsumption,
kzUint  resourceRamConsumption 
)

Updates hud.

Should be called once per rendered frame.

kzsError kzuHudAddCustomTextLine ( struct KzuHud hud,
kzString  customString 
)

Adds custom text line to HUD.

Buffer of custom text lines is cleared after each kzuHudUpdate.

kzsError kzuHudRenderDebugInfo ( const struct KzuHud hud,
kanzi::Renderer3D renderer,
const struct KzcMemoryManager quickMemoryManager,
const struct KzcVector2 offset,
const struct KzcVector2 limits,
kzBool  backgroundToDynamicText 
)

Render the hud.

kzsError kzuHudRenderLog ( const struct KzuHud hud,
const kanzi::Renderer3D renderer,
const struct KzcMemoryManager quickMemoryManager,
const struct KzcVector2 offset,
const struct KzcVector2 limits 
)

Render the log.

kzsError kzuHudDrawText ( struct KzuFont font,
const struct KzuTextLayouter textLayouter,
const struct KzcMemoryManager memoryManager,
kanzi::Renderer renderer,
kzString  text,
kzFloat  x,
kzFloat  y,
kzBool  isOutlinedShadow,
kzFloat out_ySpace 
)

Draws single text line.

kzsError kzuHudRenderAnimationPlayerInfo ( const struct KzuHud hud,
kanzi::Renderer3D renderer,
const struct KzcMemoryManager quickMemoryManager,
const struct KzcVector2 offset,
const struct KzcVector2 limits,
const struct KzuAnimationPlayer rootAnimationPlayer 
)

Render the animation player info.

void kzuHudSetLogVisualizationEnabled ( struct KzuHud hud,
kzBool  enabled 
)

Sets log visualization enabled in hud.

kzBool kzuHudIsLogVisualizationEnabled ( const struct KzuHud hud)

Returns if log visualization is enabled on HUD.

void kzuHudSetRenderFlags ( struct KzuHud hud,
kzU32  flags 
)

Sets render flags for hud.

struct KzuFont* kzuHudGetFont ( const struct KzuHud hud)

Gets the default font from hud.