Kohi Game Engine
|
Go to the source code of this file.
Data Structures | |
struct | kruntime_plugin |
Typedefs | |
typedef b8(* | PFN_kruntime_plugin_create) (struct kruntime_plugin *out_plugin) |
typedef b8(* | PFN_kruntime_plugin_boot) (struct kruntime_plugin *plugin) |
typedef b8(* | PFN_kruntime_plugin_initialize) (struct kruntime_plugin *plugin) |
typedef void(* | PFN_kruntime_plugin_destroy) (struct kruntime_plugin *plugin) |
typedef b8(* | PFN_kruntime_plugin_update) (struct kruntime_plugin *plugin, struct frame_data *p_frame_data) |
typedef b8(* | PFN_kruntime_plugin_frame_prepare) (struct kruntime_plugin *plugin, struct frame_data *p_frame_data) |
typedef b8(* | PFN_kruntime_plugin_render) (struct kruntime_plugin *plugin, struct frame_data *p_frame_data) |
typedef void(* | PFN_kruntime_plugin_on_window_resized) (void *plugin_state, struct kwindow *window, u16 width, u16 height) |
typedef struct kruntime_plugin | kruntime_plugin |
typedef struct kruntime_plugin kruntime_plugin |
A generic structure to hold function pointers for a given plugin. These serve as the plugin's hook into the system at various points of its lifecycle. Only the 'create' and 'destroy' are required, all others are optional. Also note that the "create" isn't saved because it is only called the first time the plugin is loaded.
NOTE: There must be an exported function named the same as each parameter for it to get picked up automatically. For example, the "vulkan renderer" plugin must have an exported function called "kplugin_create". This is automatically found via dynamic linking by name, and thus the names must match to facilitate automatic linking.
typedef b8(* PFN_kruntime_plugin_boot) (struct kruntime_plugin *plugin) |
typedef b8(* PFN_kruntime_plugin_create) (struct kruntime_plugin *out_plugin) |
typedef void(* PFN_kruntime_plugin_destroy) (struct kruntime_plugin *plugin) |
typedef b8(* PFN_kruntime_plugin_frame_prepare) (struct kruntime_plugin *plugin, struct frame_data *p_frame_data) |
typedef b8(* PFN_kruntime_plugin_initialize) (struct kruntime_plugin *plugin) |
typedef void(* PFN_kruntime_plugin_on_window_resized) (void *plugin_state, struct kwindow *window, u16 width, u16 height) |
typedef b8(* PFN_kruntime_plugin_render) (struct kruntime_plugin *plugin, struct frame_data *p_frame_data) |
typedef b8(* PFN_kruntime_plugin_update) (struct kruntime_plugin *plugin, struct frame_data *p_frame_data) |