better lighting
This commit is contained in:
parent
805a2713a3
commit
6ed4e17065
75 changed files with 6417 additions and 3667 deletions
30
src/bsp/pxl8_bsp_render.h
Normal file
30
src/bsp/pxl8_bsp_render.h
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
#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;
|
||||
} 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,
|
||||
pxl8_bsp_render_state* state, pxl8_vec3 camera_pos);
|
||||
void pxl8_bsp_render_face(pxl8_gfx* gfx, const pxl8_bsp* bsp, u32 face_id,
|
||||
const pxl8_gfx_material* material);
|
||||
void pxl8_bsp_set_material(pxl8_bsp_render_state* state, u16 material_id,
|
||||
const pxl8_gfx_material* material);
|
||||
void pxl8_bsp_set_wireframe(pxl8_bsp_render_state* state, bool wireframe);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
Loading…
Add table
Add a link
Reference in a new issue