Update zeux/meshoptimizer

This commit is contained in:
Philip Rideout
2018-12-06 10:46:34 -08:00
parent 6f601e6021
commit 33383ab7fb
9 changed files with 56 additions and 35 deletions

View File

@@ -38,7 +38,7 @@ size_t meshopt_optimizeVertexFetch(void* destination, unsigned int* indices, siz
// support in-place optimization
if (destination == vertices)
{
char* vertices_copy = allocator.allocate<char>(vertex_count * vertex_size);
unsigned char* vertices_copy = allocator.allocate<unsigned char>(vertex_count * vertex_size);
memcpy(vertices_copy, vertices, vertex_count * vertex_size);
vertices = vertices_copy;
}
@@ -59,7 +59,7 @@ size_t meshopt_optimizeVertexFetch(void* destination, unsigned int* indices, siz
if (remap == ~0u) // vertex was not added to destination VB
{
// add vertex
memcpy(static_cast<char*>(destination) + next_vertex * vertex_size, static_cast<const char*>(vertices) + index * vertex_size, vertex_size);
memcpy(static_cast<unsigned char*>(destination) + next_vertex * vertex_size, static_cast<const unsigned char*>(vertices) + index * vertex_size, vertex_size);
remap = next_vertex++;
}