2016.11.1 OpenGL learning, black screen does not display graphics

The reason for looking for an afternoon: the original sentence
glBufferData
(
GLenum
(
GL_ARRAY_BUFFER
),
MemoryLayout
.
size
(ofValue:
vertices
)
.
vertices
,
GLenum
(
GL_STATIC_DRAW
In SWIFT2, the sizeof method is replaced with the memoryLayout method. The memoryLayout. Size (ofValue: vertices) retrieves only one of the vertices in the array, so it needs to be multiplied by the number. GlBufferData (GLenum(GL_ARRAY_BUFFER), memorylayout.size (ofValue: vertices)*6, vertices, GLenum(GL_STATIC_DRAW))

Read More: