-/* finalization: tightly pack data */
-__attribute__((warn_unused_result))
-VG_STATIC scene *scene_fix( void *lin_alloc, scene *pscene )
-{
- /* FIXME: Why is this disabled? */
-
- u32 vertex_count = pscene->vertex_count,
- indice_count = pscene->indice_count,
- vertex_length = vertex_count * sizeof(scene_vert),
- index_length = indice_count * sizeof(u32),
- tot_size = vg_align8(sizeof(scene) + vertex_length + index_length);
-
- /* copy down index data */
- void *dst_indices = pscene->arrvertices + vertex_count;
- memmove( dst_indices, pscene->arrindices, index_length );
-
- /* realloc */
- pscene = vg_linear_resize( lin_alloc, pscene, tot_size );
-
- pscene->arrvertices = (scene_vert *)(pscene+1);
- pscene->arrindices = (u32 *)(pscene->arrvertices+vertex_count);
- pscene->max_vertices = vertex_count;
- pscene->max_indices = indice_count;
-
- return pscene;
-}