-/* finalization: tightly pack data */
-__attribute__((warn_unused_result))
-VG_STATIC scene *scene_fix( void *lin_alloc, scene *pscene )
-{
- return pscene;
- u32 vertex_count = pscene->vertex_count,
- indice_count = pscene->indice_count,
- vertex_length = vertex_count * sizeof(mdl_vert),
- index_length = indice_count * sizeof(u32),
- tot_size = sizeof(scene) + vertex_length + index_length;
-
- /* copy down index data */
- void *dst_indices = pscene->arrvertices + vertex_length;
- memmove( dst_indices, pscene->arrindices, index_length );
-
- /* realloc */
- pscene = vg_linear_resize( lin_alloc, pscene, tot_size );
-
- pscene->arrvertices = (mdl_vert *)(pscene+1);
- pscene->arrindices = (u32 *)(pscene->arrvertices+vertex_count);
- pscene->max_vertices = vertex_count;
- pscene->max_indices = indice_count;
-
- return pscene;
+static void scene_set_vertex_flags( scene_context *ctx,
+ u32 start, u32 count, u16 flags ){
+ for( u32 i=0; i<count; i++ )
+ ctx->arrvertices[ start + i ].flags = flags;