float[] verticies = new float[] { -1.0f, -1.0f, 0.0f, 1.0f, 1.0f, -1.0f, 0.0f, 1.0f, -1.0f, 1.0f, 0.0f, 1.0f, 1.0f, 1.0f, 0.0f, 1.0f }; int vertexIndex = 2; GL.ArrayElement(vertexIndex);
float[] verticies = new float[] { -1.0f, -1.0f, 0.0f, 1.0f, 1.0f, -1.0f, 0.0f, 1.0f, -1.0f, 1.0f, 0.0f, 1.0f, 1.0f, 1.0f, 0.0f, 1.0f }; int vertexCount = 4; for (int i = 0; i < vertexCount; i++) { GL.ArrayElement(i); }In this example, we want to specify all the vertices in the array. The GL.ArrayElement method is used in a loop to specify each vertex. The GL ArrayElement method is part of the OpenGL package library in C#.