1
| | GLfloat Vertices[5][3] ={{-5.0, -5.0, 5.0},
{5.0, -5.0, -5.0},
{0.0, 5.0, 0.0},
{-5.0, -5.0, -5.0},
{5.0, -5.0, 5.0}
};
GLfloat Colors[5][3] = {{0.0, 0.0, 0.0},
{0.0, 0.0, 0.3},
{0.0, 0.0, 0.0},
{0.0, 0.0, 0.0},
{0.0, 0.0, 0.3},
};
glVertexPointer(3,
GL_FLOAT, 0,
Vertices
);
GLuint Indices[12] = {0, 1, 2, 3 ,1 ,2, 1, 3, 2, 4, 1, 2};
glDrawElements( GL_TRIANGLES,
12, GL_UNSIGNED_INT,
Indices
); |