6 typedef struct scene_context scene_context
;
7 typedef struct scene_vert scene_vert
;
11 /* 32 byte vertexs, we don't care about the normals too much,
12 * maybe possible to bring down uv to i16s too */
18 u16 flags
; /* only for the cpu. its junk on the gpu */
25 * 1. this should probably be a CONTEXT based approach unlike this mess.
26 * take a bit of the mdl_context ideas and redo this header. its messed up
27 * pretty bad right now.
32 scene_vert
*arrvertices
;
35 u32 vertex_count
, indice_count
,
36 max_vertices
, max_indices
;
42 extern bh_system bh_system_scene
;
43 bh_tree
*scene_bh_create( void *lin_alloc
, scene_context
*s
);
44 int scene_raycast( scene_context
*s
, bh_tree
*bh
,
45 v3f co
, v3f dir
, ray_hit
*hit
, u16 ignore
);
46 vg_async_item
*scene_alloc_async( scene_context
*scene
, glmesh
*mesh
,
47 u32 max_vertices
, u32 max_indices
);
48 void scene_copy_slice( scene_context
*ctx
, mdl_submesh
*sm
);
49 void scene_push_vert( scene_context
*ctx
, scene_vert
*v
);
50 void scene_vert_pack_norm( scene_vert
*vert
, v3f norm
, f32 blend
);
51 void scene_push_tri( scene_context
*ctx
, u32 tri
[3] );
52 void scene_add_mdl_submesh( scene_context
*ctx
, mdl_context
*mdl
,
53 mdl_submesh
*sm
, m4x3f transform
);
54 void scene_set_vertex_flags( scene_context
*ctx
,
55 u32 start
, u32 count
, u16 flags
);
56 void scene_supply_buffer( scene_context
*ctx
, void *buffer
);
57 void scene_init( scene_context
*ctx
, u32 max_vertices
, u32 max_indices
);
58 u32
scene_mem_required( scene_context
*ctx
);
59 void async_scene_upload( void *payload
, u32 size
);
60 void scene_upload_async( scene_context
*ctx
, glmesh
*mesh
);