Kohi Game Engine
engine.h File Reference

This file contains structures and logic pertaining to the overall engine itself. The engine is responsible for managing both the platform layers as well as all systems within the engine. More...

#include "defines.h"
#include "identifiers/khandle.h"
#include "platform/vfs.h"

Go to the source code of this file.

Data Structures

struct  engine_system_states
 

Typedefs

typedef struct engine_system_states engine_system_states
 

Functions

KAPI b8 engine_create (struct application *app)
 Creates the engine, standing up the platform layer and all underlying subsystems. More...
 
KAPI b8 engine_run (struct application *app)
 Starts the main engine loop. More...
 
void engine_on_event_system_initialized (void)
 A callback made when the event system is initialized, which internally allows the engine to begin listening for events required for initialization. More...
 
KAPI const struct frame_dataengine_frame_data_get (void)
 Obtains a constant pointer to the current frame data. More...
 
KAPI const engine_system_statesengine_systems_get (void)
 Obtains a constant pointer to the collection of system states from the engine. More...
 
KAPI khandle engine_external_system_register (u64 system_state_memory_requirement)
 
KAPI void * engine_external_system_state_get (khandle system_handle)
 
KAPI struct kwindowengine_active_window_get (void)
 

Detailed Description

This file contains structures and logic pertaining to the overall engine itself. The engine is responsible for managing both the platform layers as well as all systems within the engine.

Author
Travis Vroman (travi.nosp@m.s@ko.nosp@m.hieng.nosp@m.ine..nosp@m.com)
Version
1.0
Date
2022-01-10

Typedef Documentation

◆ engine_system_states

Function Documentation

◆ engine_active_window_get()

KAPI struct kwindow* engine_active_window_get ( void  )

◆ engine_create()

KAPI b8 engine_create ( struct application app)

Creates the engine, standing up the platform layer and all underlying subsystems.

Parameters
appA pointer to the application instance associated with the engine
Returns
True on success; otherwise false.

◆ engine_external_system_register()

KAPI khandle engine_external_system_register ( u64  system_state_memory_requirement)

◆ engine_external_system_state_get()

KAPI void* engine_external_system_state_get ( khandle  system_handle)

◆ engine_frame_data_get()

KAPI const struct frame_data* engine_frame_data_get ( void  )

Obtains a constant pointer to the current frame data.

Returns
A constant pointer to the current frame data.

◆ engine_on_event_system_initialized()

void engine_on_event_system_initialized ( void  )

A callback made when the event system is initialized, which internally allows the engine to begin listening for events required for initialization.

◆ engine_run()

KAPI b8 engine_run ( struct application app)

Starts the main engine loop.

Parameters
appA pointer to the application instance associated with the engine
Returns
True on success; otherwise false.

◆ engine_systems_get()

KAPI const engine_system_states* engine_systems_get ( void  )

Obtains a constant pointer to the collection of system states from the engine.