Kanzi Framework  3.9.0
Kanzi Engine API
kzu_engine.h File Reference

Classes

struct  KzuEngine
 Structure for graphics engine core functionality. Handles the state machine, pipeline and storage specific functionality. More...
 

Namespaces

 kanzi
 Easing functions that require external dependencies for calculation.
 

Macros

#define KZU_ENGINE_DEFAULT_INDEX_BUFFER_POOL_SIZE
 Default index buffer pool size. More...
 
#define KZU_ENGINE_DEFAULT_VERTEX_BUFFER_POOL_SIZE
 Default vertex buffer pool size. More...
 

Typedefs

using kanzi::FramebufferSharedPtr = shared_ptr< Framebuffer >
 Framebuffer shared pointer type. More...
 

Functions

kzsError kzuEngineCreate (kanzi::Domain *domain, kzString binaryName, kanzi::StartupProfilerRegistry *m_startupProfilerRegistry, struct KzuEngine **out_engine)
 Create a new engine and necessary components for it, such as renderer and its default materials. More...
 
kzsError kzuEngineDelete (KzuEngine *engine)
 Deletes an engine. More...
 
kzFloat kzuEngineGetFramesPerSecond (const struct KzuEngine *engine)
 Gets frames per second from engine (FPS), measuring the overall frames per second. More...
 
kanzi::Vector2 kzuEngineGetRenderingAreaOffset (struct KzuEngine *engine)
 
kanzi::TextureSharedPtr kzuEngineGetRootCompositionTarget (struct KzuEngine *engine)
 Access root framebuffer from engine. More...
 
kanzi::ScreenSharedPtr kzuEngineGetScreen (const struct KzuEngine *engine)
 Gets screen of engine. More...
 
kzsError kzuEngineInvalidateGPUResources (const struct KzuEngine *engine)
 
void kzuEngineInvalidateScreenLayout (struct KzuEngine *engine)
 Invalidates the layout of the attached screen. More...
 
kzsError kzuEngineLoadBinary (struct KzuEngine *engine, kzBool toolPresent)
 Loads the KZB files if they have not yet been loaded. More...
 
void kzuEngineMeasurePerformance (struct KzuEngine *engine, kanzi::chrono::nanoseconds deltaTime)
 Updates engine FPS calculations. More...
 
kzsError kzuEngineRestoreNodeResources (const struct KzuEngine *engine)
 
void kzuEngineSetRenderingAreaOffset (struct KzuEngine *engine, const kanzi::Vector2 &offset)
 
void kzuEngineSetRootCompositionTarget (struct KzuEngine *engine, kanzi::TextureSharedPtr framebuffer)
 Set root framebuffer for engine to use. More...
 
kzsError kzuEngineSetScreen (struct KzuEngine *engine, kanzi::ScreenSharedPtr screen)
 Sets screen of engine. More...
 
kzsError kzuEngineSetScreenOrientation (struct KzuEngine *engine, kanzi::WindowOrientation orientation)
 Sets the orientation of the screen. More...
 

Macro Definition Documentation

◆ KZU_ENGINE_DEFAULT_VERTEX_BUFFER_POOL_SIZE

#define KZU_ENGINE_DEFAULT_VERTEX_BUFFER_POOL_SIZE

Default vertex buffer pool size.

◆ KZU_ENGINE_DEFAULT_INDEX_BUFFER_POOL_SIZE

#define KZU_ENGINE_DEFAULT_INDEX_BUFFER_POOL_SIZE

Default index buffer pool size.

Function Documentation

◆ kzuEngineCreate()

kzsError kzuEngineCreate ( kanzi::Domain domain,
kzString  binaryName,
kanzi::StartupProfilerRegistry m_startupProfilerRegistry,
struct KzuEngine **  out_engine 
)

Create a new engine and necessary components for it, such as renderer and its default materials.

◆ kzuEngineDelete()

kzsError kzuEngineDelete ( KzuEngine engine)

Deletes an engine.

◆ kzuEngineMeasurePerformance()

void kzuEngineMeasurePerformance ( struct KzuEngine engine,
kanzi::chrono::nanoseconds  deltaTime 
)

Updates engine FPS calculations.

Should be called once per frame.

◆ kzuEngineGetFramesPerSecond()

kzFloat kzuEngineGetFramesPerSecond ( const struct KzuEngine engine)

Gets frames per second from engine (FPS), measuring the overall frames per second.

◆ kzuEngineLoadBinary()

kzsError kzuEngineLoadBinary ( struct KzuEngine engine,
kzBool  toolPresent 
)

Loads the KZB files if they have not yet been loaded.

◆ kzuEngineSetScreen()

kzsError kzuEngineSetScreen ( struct KzuEngine engine,
kanzi::ScreenSharedPtr  screen 
)

Sets screen of engine.

◆ kzuEngineGetScreen()

kanzi::ScreenSharedPtr kzuEngineGetScreen ( const struct KzuEngine engine)

Gets screen of engine.

◆ kzuEngineSetScreenOrientation()

kzsError kzuEngineSetScreenOrientation ( struct KzuEngine engine,
kanzi::WindowOrientation  orientation 
)

Sets the orientation of the screen.

◆ kzuEngineInvalidateScreenLayout()

void kzuEngineInvalidateScreenLayout ( struct KzuEngine engine)

Invalidates the layout of the attached screen.

◆ kzuEngineInvalidateGPUResources()

kzsError kzuEngineInvalidateGPUResources ( const struct KzuEngine engine)

◆ kzuEngineRestoreNodeResources()

kzsError kzuEngineRestoreNodeResources ( const struct KzuEngine engine)

◆ kzuEngineSetRootCompositionTarget()

void kzuEngineSetRootCompositionTarget ( struct KzuEngine engine,
kanzi::TextureSharedPtr  framebuffer 
)

Set root framebuffer for engine to use.

Parameters
engineEngine.
framebufferRoot framebuffer used from now on.

◆ kzuEngineGetRootCompositionTarget()

kanzi::TextureSharedPtr kzuEngineGetRootCompositionTarget ( struct KzuEngine engine)

Access root framebuffer from engine.

Parameters
engineEngine.
Returns
Root framebuffer in use, may be an empty pointer.

◆ kzuEngineGetRenderingAreaOffset()

kanzi::Vector2 kzuEngineGetRenderingAreaOffset ( struct KzuEngine engine)

◆ kzuEngineSetRenderingAreaOffset()

void kzuEngineSetRenderingAreaOffset ( struct KzuEngine engine,
const kanzi::Vector2 offset 
)