Kohi Game Engine
application Struct Reference

Represents the basic application state in a application. Called for creation by the application. More...

#include <application_types.h>

Data Fields

application_config app_config
 The application configuration. More...
 
b8(* boot )(struct application *app_inst)
 Function pointer to the application's boot sequence. This should fill out the application config with the application's specific requirements. More...
 
b8(* initialize )(struct application *app_inst)
 Function pointer to application's initialize function. More...
 
b8(* update )(struct application *app_inst, struct frame_data *p_frame_data)
 Function pointer to application's update function. More...
 
b8(* prepare_frame )(struct application *app_inst, struct frame_data *p_frame_data)
 Function pointer to application's prepare_frame function. More...
 
b8(* render_frame )(struct application *app_inst, struct frame_data *p_frame_data)
 Function pointer to application's render_frame function. More...
 
void(* on_resize )(struct application *app_inst, u32 width, u32 height)
 Function pointer to handle resizes, if applicable. More...
 
void(* shutdown )(struct application *app_inst)
 Shuts down the application, prompting release of resources. More...
 
void(* lib_on_unload )(struct application *game_inst)
 
void(* lib_on_load )(struct application *game_inst)
 
application_stage stage
 The application stage of execution. More...
 
void * state
 application-specific state. Created and managed by the application. More...
 
void * engine_state
 A block of memory to hold the engine state. Created and managed by the engine. More...
 
dynamic_library renderer_library
 
renderer_plugin render_plugin
 
dynamic_library audio_library
 
audio_plugin audio_plugin
 
dynamic_library game_library
 

Detailed Description

Represents the basic application state in a application. Called for creation by the application.

Field Documentation

◆ app_config

application_config app_config

The application configuration.

◆ audio_library

dynamic_library audio_library

◆ audio_plugin

◆ boot

b8(* boot) (struct application *app_inst)

Function pointer to the application's boot sequence. This should fill out the application config with the application's specific requirements.

Parameters
app_instA pointer to the application instance.
Returns
True on success; otherwise false.

◆ engine_state

void* engine_state

A block of memory to hold the engine state. Created and managed by the engine.

◆ game_library

dynamic_library game_library

◆ initialize

b8(* initialize) (struct application *app_inst)

Function pointer to application's initialize function.

Parameters
app_instA pointer to the application instance.
Returns
True on success; otherwise false.

◆ lib_on_load

void(* lib_on_load) (struct application *game_inst)

◆ lib_on_unload

void(* lib_on_unload) (struct application *game_inst)

◆ on_resize

void(* on_resize) (struct application *app_inst, u32 width, u32 height)

Function pointer to handle resizes, if applicable.

Parameters
app_instA pointer to the application instance.
widthThe width of the window in pixels.
heightThe height of the window in pixels.

◆ prepare_frame

b8(* prepare_frame) (struct application *app_inst, struct frame_data *p_frame_data)

Function pointer to application's prepare_frame function.

Parameters
app_instA pointer to the application instance.
p_frame_dataA pointer to the current frame's data.
Returns
True on success; otherwise false.

◆ render_frame

b8(* render_frame) (struct application *app_inst, struct frame_data *p_frame_data)

Function pointer to application's render_frame function.

Parameters
app_instA pointer to the application instance.
p_frame_dataA pointer to the current frame's data.
Returns
True on success; otherwise false.

◆ render_plugin

renderer_plugin render_plugin

◆ renderer_library

dynamic_library renderer_library

◆ shutdown

void(* shutdown) (struct application *app_inst)

Shuts down the application, prompting release of resources.

Parameters
app_instA pointer to the application instance.

◆ stage

The application stage of execution.

◆ state

void* state

application-specific state. Created and managed by the application.

◆ update

b8(* update) (struct application *app_inst, struct frame_data *p_frame_data)

Function pointer to application's update function.

Parameters
app_instA pointer to the application instance.
p_frame_dataA pointer to the current frame's data.
Returns
True on success; otherwise false.

The documentation for this struct was generated from the following file: