@@ -766,6 +766,8 @@ inline size_t meshopt_buildMeshlets(meshopt_Meshlet* meshlets, unsigned int* mes
766766template <typename T>
767767inline size_t meshopt_buildMeshletsScan (meshopt_Meshlet* meshlets, unsigned int * meshlet_vertices, unsigned char * meshlet_triangles, const T* indices, size_t index_count, size_t vertex_count, size_t max_vertices, size_t max_triangles);
768768template <typename T>
769+ inline size_t meshopt_buildMeshletsFlex (meshopt_Meshlet* meshlets, unsigned int * meshlet_vertices, unsigned char * meshlet_triangles, const T* indices, size_t index_count, const float * vertex_positions, size_t vertex_count, size_t vertex_positions_stride, size_t max_vertices, size_t min_triangles, size_t max_triangles, float cone_weight, float split_factor);
770+ template <typename T>
769771inline meshopt_Bounds meshopt_computeClusterBounds (const T* indices, size_t index_count, const float * vertex_positions, size_t vertex_count, size_t vertex_positions_stride);
770772template <typename T>
771773inline size_t meshopt_partitionClusters (unsigned int * destination, const T* cluster_indices, size_t total_index_count, const unsigned int * cluster_index_counts, size_t cluster_count, size_t vertex_count, size_t target_partition_size);
@@ -1148,6 +1150,14 @@ inline size_t meshopt_buildMeshletsScan(meshopt_Meshlet* meshlets, unsigned int*
11481150 return meshopt_buildMeshletsScan (meshlets, meshlet_vertices, meshlet_triangles, in.data , index_count, vertex_count, max_vertices, max_triangles);
11491151}
11501152
1153+ template <typename T>
1154+ inline size_t meshopt_buildMeshletsFlex (meshopt_Meshlet* meshlets, unsigned int * meshlet_vertices, unsigned char * meshlet_triangles, const T* indices, size_t index_count, const float * vertex_positions, size_t vertex_count, size_t vertex_positions_stride, size_t max_vertices, size_t min_triangles, size_t max_triangles, float cone_weight, float split_factor)
1155+ {
1156+ meshopt_IndexAdapter<T> in (NULL , indices, index_count);
1157+
1158+ return meshopt_buildMeshletsFlex (meshlets, meshlet_vertices, meshlet_triangles, in.data , index_count, vertex_positions, vertex_count, vertex_positions_stride, max_vertices, min_triangles, max_triangles, cone_weight, split_factor);
1159+ }
1160+
11511161template <typename T>
11521162inline meshopt_Bounds meshopt_computeClusterBounds (const T* indices, size_t index_count, const float * vertex_positions, size_t vertex_count, size_t vertex_positions_stride)
11531163{
0 commit comments