Post

Replies

Boosts

Views

Activity

Reply to Creating SCNGeometryElement with SCNGeometryPrimitiveType.polygon always causes error
I once got this working and never touched it afterwards. I agree the documentation by Apple is really bad in this topic. I'd suggest to read about the data structures of OpenGL which are mostly the same. With .triangleStrip every new vertex at the end of the array adds another triangle and everything is connected. I think with .polygon mode you have to define the three vertices for every triangle. So the first three vertices are one triangle and then the next three vertices are another triangle, separate from the first one. Only a number of 3 is valid. So in your code you have to add two more vertices or remove one.
Feb ’22