From 3bb0f7be31717aaa07de53f9b36d8941325efb57 Mon Sep 17 00:00:00 2001 From: awkrupka Date: Thu, 19 Oct 2023 13:40:18 +0200 Subject: [PATCH] Disabled unnecessary assertions for triangle topology in general-purpose remap functions --- src/indexgenerator.cpp | 6 ------ 1 file changed, 6 deletions(-) diff --git a/src/indexgenerator.cpp b/src/indexgenerator.cpp index cad808a2b..06a9219c6 100644 --- a/src/indexgenerator.cpp +++ b/src/indexgenerator.cpp @@ -187,7 +187,6 @@ size_t meshopt_generateVertexRemap(unsigned int* destination, const unsigned int using namespace meshopt; assert(indices || index_count == vertex_count); - assert(!indices || index_count % 3 == 0); assert(vertex_size > 0 && vertex_size <= 256); meshopt_Allocator allocator; @@ -236,7 +235,6 @@ size_t meshopt_generateVertexRemapMulti(unsigned int* destination, const unsigne using namespace meshopt; assert(indices || index_count == vertex_count); - assert(index_count % 3 == 0); assert(stream_count > 0 && stream_count <= 16); for (size_t i = 0; i < stream_count; ++i) @@ -313,8 +311,6 @@ void meshopt_remapVertexBuffer(void* destination, const void* vertices, size_t v void meshopt_remapIndexBuffer(unsigned int* destination, const unsigned int* indices, size_t index_count, const unsigned int* remap) { - assert(index_count % 3 == 0); - for (size_t i = 0; i < index_count; ++i) { unsigned int index = indices ? indices[i] : unsigned(i); @@ -329,7 +325,6 @@ void meshopt_generateShadowIndexBuffer(unsigned int* destination, const unsigned using namespace meshopt; assert(indices); - assert(index_count % 3 == 0); assert(vertex_size > 0 && vertex_size <= 256); assert(vertex_size <= vertex_stride); @@ -368,7 +363,6 @@ void meshopt_generateShadowIndexBufferMulti(unsigned int* destination, const uns using namespace meshopt; assert(indices); - assert(index_count % 3 == 0); assert(stream_count > 0 && stream_count <= 16); for (size_t i = 0; i < stream_count; ++i)