Missing faces/vertices in custom mesh (using VertexData)

I am trying to mathematically generate a custom mesh from a bunch of vertices, however many of the vertices aren’t appearing. Can anyone suggest why this might be?
Please see the Playground example below:

It looks like some of your faces are not in the correct order: Face Culling - OpenGL Wiki

Disabling back face culling tends to prove this out.


Thanks @sebavan, this worked perfectly. I had actually made another error too, where I had only been adding to the indices array after every facet (12 numbers added to position array), rather than every 3 numbers added to the position array.
So for any lost soles who stumble across this post, the below is the fixed Playground example.

1 Like