- pscene->verts = buffer_reserve( pscene->verts, pscene->vertex_count,
- &pscene->vertex_cap, submodel->vertex_count, sizeof(model_vert) );
- pscene->indices = buffer_reserve( pscene->indices, pscene->indice_count,
- &pscene->indice_cap, submodel->indice_count, sizeof(u32) );
-
- /* Transform and place vertices */
- model_vert *src_verts = submodel_vert_data( mdl, submodel );
- u32 *src_indices = submodel_indice_data( mdl, submodel );
-
- m4x3f mtx;
- m4x3_identity( mtx );
- m4x3_translate( mtx, pos );
- m4x3_rotate_y( mtx, yaw );
- m4x3_scale( mtx, scale );
-
- boxf bbxnew;
- box_copy( submodel->bbx, bbxnew );
- m4x3_transform_aabb( mtx, bbxnew );
- box_concat( pscene->bbx, bbxnew );
-
- m3x3f rotation;
- m4x3_to_3x3( mtx, rotation );
-
- float rand_hue = vg_randf();
-
- for( u32 i=0; i<submodel->vertex_count; i++ )