Kohi Game Engine
static_mesh_system.h File Reference

Go to the source code of this file.

Data Structures

struct  kstatic_mesh_instance
 Represents an instance of a static mesh. This is to be used in the world. Material instances are obtained when acquiring this static mesh instance, and released when releasing this static mesh instance. More...
 
struct  static_mesh_system_config
 

Typedefs

typedef struct kstatic_mesh_instance kstatic_mesh_instance
 Represents an instance of a static mesh. This is to be used in the world. Material instances are obtained when acquiring this static mesh instance, and released when releasing this static mesh instance. More...
 
typedef struct static_mesh_system_config static_mesh_system_config
 

Functions

KAPI b8 static_mesh_system_initialize (u64 *memory_requirement, struct static_mesh_system_state *state, static_mesh_system_config config)
 
KAPI void static_mesh_system_shutdown (struct static_mesh_system_state *state)
 
KAPI kstatic_mesh_instance static_mesh_instance_acquire (struct static_mesh_system_state *state, kname asset_name)
 
KAPI kstatic_mesh_instance static_mesh_instance_acquire_from_package (struct static_mesh_system_state *state, kname asset_name, kname package_name)
 
KAPI void static_mesh_instance_release (struct static_mesh_system_state *state, kstatic_mesh_instance *instance)
 
KAPI b8 static_mesh_is_loaded (struct static_mesh_system_state *state, kstatic_mesh m)
 
KAPI b8 static_mesh_tint_get (struct static_mesh_system_state *state, kstatic_mesh_instance instance, vec4 *out_tint)
 
KAPI b8 static_mesh_tint_set (struct static_mesh_system_state *state, kstatic_mesh_instance instance, vec4 tint)
 
KAPI b8 static_mesh_extents_get (struct static_mesh_system_state *state, kstatic_mesh m, extents_3d *out_extents)
 
KAPI b8 static_mesh_submesh_count_get (struct static_mesh_system_state *state, kstatic_mesh m, u16 *out_count)
 
KAPI const kgeometrystatic_mesh_submesh_geometry_get_at (struct static_mesh_system_state *state, kstatic_mesh m, u16 index)
 
KAPI const material_instancestatic_mesh_submesh_material_instance_get_at (struct static_mesh_system_state *state, kstatic_mesh_instance instance, u16 index)
 
KAPI b8 static_mesh_render_data_generate (struct static_mesh_system_state *state, kstatic_mesh_instance instance, kstatic_mesh_render_data_flag_bits flags, kstatic_mesh_render_data *out_render_data)
 
KAPI void static_mesh_render_data_destroy (kstatic_mesh_render_data *render_data)
 

Typedef Documentation

◆ kstatic_mesh_instance

Represents an instance of a static mesh. This is to be used in the world. Material instances are obtained when acquiring this static mesh instance, and released when releasing this static mesh instance.

◆ static_mesh_system_config

Function Documentation

◆ static_mesh_extents_get()

KAPI b8 static_mesh_extents_get ( struct static_mesh_system_state *  state,
kstatic_mesh  m,
extents_3d out_extents 
)

◆ static_mesh_instance_acquire()

KAPI kstatic_mesh_instance static_mesh_instance_acquire ( struct static_mesh_system_state *  state,
kname  asset_name 
)

◆ static_mesh_instance_acquire_from_package()

KAPI kstatic_mesh_instance static_mesh_instance_acquire_from_package ( struct static_mesh_system_state *  state,
kname  asset_name,
kname  package_name 
)

◆ static_mesh_instance_release()

KAPI void static_mesh_instance_release ( struct static_mesh_system_state *  state,
kstatic_mesh_instance instance 
)

◆ static_mesh_is_loaded()

KAPI b8 static_mesh_is_loaded ( struct static_mesh_system_state *  state,
kstatic_mesh  m 
)

◆ static_mesh_render_data_destroy()

KAPI void static_mesh_render_data_destroy ( kstatic_mesh_render_data render_data)

◆ static_mesh_render_data_generate()

KAPI b8 static_mesh_render_data_generate ( struct static_mesh_system_state *  state,
kstatic_mesh_instance  instance,
kstatic_mesh_render_data_flag_bits  flags,
kstatic_mesh_render_data out_render_data 
)

◆ static_mesh_submesh_count_get()

KAPI b8 static_mesh_submesh_count_get ( struct static_mesh_system_state *  state,
kstatic_mesh  m,
u16 out_count 
)

◆ static_mesh_submesh_geometry_get_at()

KAPI const kgeometry* static_mesh_submesh_geometry_get_at ( struct static_mesh_system_state *  state,
kstatic_mesh  m,
u16  index 
)

◆ static_mesh_submesh_material_instance_get_at()

KAPI const material_instance* static_mesh_submesh_material_instance_get_at ( struct static_mesh_system_state *  state,
kstatic_mesh_instance  instance,
u16  index 
)

◆ static_mesh_system_initialize()

KAPI b8 static_mesh_system_initialize ( u64 memory_requirement,
struct static_mesh_system_state *  state,
static_mesh_system_config  config 
)

◆ static_mesh_system_shutdown()

KAPI void static_mesh_system_shutdown ( struct static_mesh_system_state *  state)

◆ static_mesh_tint_get()

KAPI b8 static_mesh_tint_get ( struct static_mesh_system_state *  state,
kstatic_mesh_instance  instance,
vec4 out_tint 
)

◆ static_mesh_tint_set()

KAPI b8 static_mesh_tint_set ( struct static_mesh_system_state *  state,
kstatic_mesh_instance  instance,
vec4  tint 
)