This file contains global type definitions which are used throughout the entire engine and applicatio...
#define KAPI
Import/export qualifier.
Definition: defines.h:177
unsigned int u32
Unsigned 32-bit integer.
Definition: defines.h:25
_Bool b8
8-bit boolean type
Definition: defines.h:58
float f32
32-bit floating point number
Definition: defines.h:47
unsigned long long u64
Unsigned 64-bit integer.
Definition: defines.h:28
KAPI b8 light_system_directional_add(directional_light *light)
Attempts to add a directional light to the system. Only one may be present at once,...
struct directional_light_data directional_light_data
struct point_light point_light
A point light, the most common light source, which radiates out from the given position.
KAPI b8 light_system_point_add(point_light *light)
Attempts to add a point light to the system.
KAPI u32 light_system_point_light_count(void)
Returns the total number of point lights currently in the system.
struct point_light_data point_light_data
b8 light_system_initialize(u64 *memory_requirement, void *memory, void *config)
Initializes the light system. As with most systems, this should be called twice, the first time to ob...
struct directional_light directional_light
A directional light, typically used to emulate sun/moon light.
KAPI b8 light_system_point_lights_get(point_light *p_lights)
Fills in the required array of point lights within the system. Array must already exist and have at l...
KAPI b8 light_system_point_remove(point_light *light)
Attempts to remove the given light from the system. A pointer comparison is done, meaning the light t...
KAPI directional_light * light_system_directional_light_get(void)
Obtains a pointer to the current directional light. Can be NULL if one has not been added.
KAPI b8 light_system_directional_remove(directional_light *light)
Attempts to remove the given light from the system. A pointer comparison is done, meaning the light t...
void light_system_shutdown(void *state)
Shuts down the light system, releasing all resources.
Contains various math types required for the engine.
Definition: light_system.h:18
vec4 colour
The light colour.
Definition: light_system.h:20
vec4 direction
The direction of the light. The w component is ignored.
Definition: light_system.h:22
A directional light, typically used to emulate sun/moon light.
Definition: light_system.h:28
void * debug_data
Debug data assigned to the light.
Definition: light_system.h:34
char * name
The name of the directional light.
Definition: light_system.h:30
directional_light_data data
The directional light shader data.
Definition: light_system.h:32
Definition: light_system.h:37
f32 padding
Additional padding used for memory alignment purposes. Ignored.
Definition: light_system.h:49
vec4 position
The position of the light in the world. The w component is ignored.
Definition: light_system.h:41
vec4 colour
The light colour.
Definition: light_system.h:39
f32 constant_f
Usually 1, make sure denominator never gets smaller than 1.
Definition: light_system.h:43
f32 quadratic
Makes the light fall off slower at longer distances.
Definition: light_system.h:47
f32 linear
Reduces light intensity linearly.
Definition: light_system.h:45
A point light, the most common light source, which radiates out from the given position.
Definition: light_system.h:56
void * debug_data
Debug data assigned to the light.
Definition: light_system.h:62
char * name
The name of the light.
Definition: light_system.h:58
point_light_data data
The shader data for the point light.
Definition: light_system.h:60
A 4-element vector.
Definition: math_types.h:89