예제 #1
0
        private void DrawLines2f_GL_1_0(Vertex2f[] vertices)
        {
            if ((vertices.Length % 2) != 0)
            {
                throw new ArgumentException("length not a multiple of 2", "vertices");
            }

            Gl.Begin(PrimitiveType.Lines);
            for (int i = 0; i < vertices.Length; i += 2)
            {
                Vertex2f v1 = vertices[i], v2 = vertices[i + 1];

                Gl.Vertex2(v1.x, v1.y);
                Gl.Vertex2(v2.x, v2.y);
            }
            Gl.End();
        }