Why Draw a square in metal, need six vertexes but in OPenGL only need four vertexes . I want to know the principle
OpenGL has a "quad" primitive that gets turned into a pair of triangles behind the scenes. Metal has no quad primitive. If you're drawing a single quad, you can use a triangle strip to draw it with only four vertices, achieving the same effect. If you're drawing a mesh composed of quads that share some vertices, the easiest approach is probably to use indexed drawing to draw two triangles per quad face, or triangle strips if the topology of the mesh is agreeable to being represented as strips.