edit for comments:
float points[] = {
-10.0f, 10.0f, -10.0f,
-10.0f, -10.0f, -10.0f,
10.0f, -10.0f, -10.0f,
10.0f, -10.0f, -10.0f,
10.0f, 10.0f, -10.0f,
-10.0f, 10.0f, -10.0f,
-10.0f, -10.0f, 10.0f,
-10.0f, -10.0f, -10.0f,
-10.0f, 10.0f, -10.0f,
-10.0f, 10.0f, -10.0f,
-10.0f, 10.0f, 10.0f,
-10.0f, -10.0f, 10.0f,
10.0f, -10.0f, -10.0f,
10.0f, -10.0f, 10.0f,
10.0f, 10.0f, 10.0f,
10.0f, 10.0f, 10.0f,
10.0f, 10.0f, -10.0f,
10.0f, -10.0f, -10.0f,
-10.0f, -10.0f, 10.0f,
-10.0f, 10.0f, 10.0f,
10.0f, 10.0f, 10.0f,
10.0f, 10.0f, 10.0f,
10.0f, -10.0f, 10.0f,
-10.0f, -10.0f, 10.0f,
-10.0f, 10.0f, -10.0f,
10.0f, 10.0f, -10.0f,
10.0f, 10.0f, 10.0f,
10.0f, 10.0f, 10.0f,
-10.0f, 10.0f, 10.0f,
-10.0f, 10.0f, -10.0f,
-10.0f, -10.0f, -10.0f,
-10.0f, -10.0f, 10.0f,
10.0f, -10.0f, -10.0f,
10.0f, -10.0f, -10.0f,
-10.0f, -10.0f, 10.0f,
10.0f, -10.0f, 10.0f
};
GLuint vbo;
glGenBuffers(1, &vbo);
glBindBuffer(GL_ARRAY_BUFFER, vbo);
glBufferData(GL_ARRAY_BUFFER, 3 * 36 * sizeof(float), &points, GL_STATIC_DRAW);
GLuint vao;
glGenVertexArrays(1, &vao);
glBindVertexArray(vao);
glEnableVertexAttribArray(0);
glBindBuffer(GL_ARRAY_BUFFER, vbo);
glVertexAttribPointer(0, 3, GL_FLOAT, GL_FALSE, 0, NULL);