2026-01-31 09:31:17 -06:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
|
|
#include "pxl8_bsp.h"
|
|
|
|
|
#include "pxl8_gfx.h"
|
|
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
|
extern "C" {
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
typedef struct pxl8_bsp_render_state {
|
|
|
|
|
pxl8_gfx_material* materials;
|
|
|
|
|
u8* render_face_flags;
|
|
|
|
|
u32 num_materials;
|
|
|
|
|
u32 num_faces;
|
2026-02-27 06:50:49 -06:00
|
|
|
bool exterior;
|
2026-01-31 09:31:17 -06:00
|
|
|
} pxl8_bsp_render_state;
|
|
|
|
|
|
|
|
|
|
pxl8_bsp_render_state* pxl8_bsp_render_state_create(u32 num_faces);
|
|
|
|
|
void pxl8_bsp_render_state_destroy(pxl8_bsp_render_state* state);
|
|
|
|
|
|
|
|
|
|
void pxl8_bsp_render(pxl8_gfx* gfx, const pxl8_bsp* bsp,
|
2026-02-27 06:50:49 -06:00
|
|
|
pxl8_bsp_render_state* state,
|
|
|
|
|
const pxl8_gfx_draw_opts* opts);
|
2026-01-31 09:31:17 -06:00
|
|
|
void pxl8_bsp_set_material(pxl8_bsp_render_state* state, u16 material_id,
|
|
|
|
|
const pxl8_gfx_material* material);
|
|
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
|
}
|
|
|
|
|
#endif
|