Can Meshes have more than 3 vertices?

Before I go out and try this by myself: Can Codea’s mesh feature support more than three vertices/points?

Yes, they can support an arbitrary number of vertices. Each triplet of three vertices is interpreted as a triangle.

The mathematician in me feels compelled to correct that. A mesh can suport an arbitrary number of triples of vertices. You can’t feed it 10 vertices, or 100, for example.

@Andrew is correct

What happens if you feed it 10?

If it errors out, Andrew is correct. If it ignores the extras, Simeon is right.

But I don’t know that either actually addresses the question directly. I read it as “if I pass 4 vertices, do I get a square?”. The way to get a square, for example, is to use two triangles, or use the convenience function who’s name escapes me right now because I’m tired and my kids have kidnapped my ipad.

The pedantic nerd in me says “arbitrary is incorrect - you must feed it a natural number of triples to have a visible effect (not pi or -1 or such), subject to limitations of the engine and iPad memory”. And I’m not even sure that is right, as while the memory on the ipad2 is doubled, I don’t know if that affects the GPU.

I apologize for all of the above. I’m beat, and in a silly mood.

10 vertices generates an invalid mesh (won’t draw, mesh.valid flag is false). It’s due to the structure used. Meshes are rendered with GL_TRIANGLES. This interprets triplets of three vertices as triangles, it is the only polygonal structure available on iOS. Desktop systems usually have GL_QUADS and GL_POLYGON available.