- m3x3f normal_matrix;
- m3x3_copy( transform, normal_matrix );
- v3_normalize( normal_matrix[0] );
- v3_normalize( normal_matrix[1] );
- v3_normalize( normal_matrix[2] );
+ if( pscene->indice_count + sm->indice_count > pscene->max_indices )
+ {
+ vg_error( "%u(current) + %u > %u\n", pscene->indice_count,
+ sm->indice_count,
+ pscene->max_indices );
+ vg_warn( "%p ... %p\n", pscene, sm );
+
+ vg_fatal_exit_loop( "Scene index buffer overflow" );
+ }
+
+ mdl_vert *src_verts = mdl_submesh_vertices( mdl, sm ),
+ *dst_verts = &pscene->arrvertices[ pscene->vertex_count ];
+
+ u32 *src_indices = mdl_submesh_indices( mdl, sm ),
+ *dst_indices = &pscene->arrindices[ pscene->indice_count ];