We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 25e3027 commit d175be5Copy full SHA for d175be5
voxelizer.h
@@ -329,10 +329,12 @@ vx_mesh_t* vx_mesh_alloc(int nvertices, int nindices)
329
{
330
vx_mesh_t* mesh = VX_MALLOC(vx_mesh_t, 1);
331
mesh->indices = VX_CALLOC(unsigned int, nindices);
332
+ mesh->normalindices = VX_CALLOC(unsigned int, nindices);
333
mesh->vertices = VX_CALLOC(vx_vertex_t, nvertices);
- mesh->normals = NULL;
334
- mesh->colors = NULL;
+ mesh->normals = VX_CALLOC(vx_vec3_t, nvertices);
335
+ mesh->colors = VX_CALLOC(vx_color_t, nvertices);
336
mesh->nindices = nindices;
337
+ mesh->nnormals = nvertices;
338
mesh->nvertices = nvertices;
339
return mesh;
340
}
0 commit comments