refactor separate framework from game code, add demo3d
This commit is contained in:
parent
19ae869769
commit
40f5cdcaa5
92 changed files with 2665 additions and 6547 deletions
29
demo3d/client/bsp/demo3d_bsp_render.h
Normal file
29
demo3d/client/bsp/demo3d_bsp_render.h
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
#pragma once
|
||||
|
||||
#include "demo3d_bsp.h"
|
||||
#include "pxl8_gfx.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef struct demo3d_bsp_render_state {
|
||||
pxl8_gfx_material* materials;
|
||||
u8* render_face_flags;
|
||||
u32 num_materials;
|
||||
u32 num_faces;
|
||||
bool exterior;
|
||||
} demo3d_bsp_render_state;
|
||||
|
||||
demo3d_bsp_render_state* demo3d_bsp_render_state_create(u32 num_faces);
|
||||
void demo3d_bsp_render_state_destroy(demo3d_bsp_render_state* state);
|
||||
|
||||
void demo3d_bsp_render(pxl8_gfx* gfx, const demo3d_bsp* bsp,
|
||||
demo3d_bsp_render_state* state,
|
||||
const pxl8_gfx_draw_opts* opts);
|
||||
void demo3d_bsp_set_material(demo3d_bsp_render_state* state, u16 material_id,
|
||||
const pxl8_gfx_material* material);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
Loading…
Add table
Add a link
Reference in a new issue