33 lines
721 B
C
33 lines
721 B
C
#pragma once
|
|
|
|
#include "pxl8_math.h"
|
|
#include "pxl8_types.h"
|
|
|
|
#define PXL8_LIGHTS_MAX 256
|
|
|
|
typedef struct pxl8_light {
|
|
pxl8_vec3 position;
|
|
f32 inv_radius_sq;
|
|
u8 r, g, b;
|
|
u8 intensity;
|
|
f32 radius;
|
|
f32 radius_sq;
|
|
} pxl8_light;
|
|
|
|
typedef struct pxl8_lights pxl8_lights;
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
pxl8_lights* pxl8_lights_create(u32 capacity);
|
|
void pxl8_lights_destroy(pxl8_lights* lights);
|
|
|
|
void pxl8_lights_add(pxl8_lights* lights, f32 x, f32 y, f32 z, u8 r, u8 g, u8 b, u8 intensity, f32 radius);
|
|
void pxl8_lights_clear(pxl8_lights* lights);
|
|
u32 pxl8_lights_count(const pxl8_lights* lights);
|
|
const pxl8_light* pxl8_lights_data(const pxl8_lights* lights);
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|