private void LineBuffer_Loading(object sender, EventArgs e) { for (int i = 0; i < this.maxlines * 2; i++) { vertex[i] = Vector3.Zero; colour[i] = Vector4.Zero; index[i] = (uint)i; } vertexVBO.Init(); vertexVBO.SetData(vertex); colourVBO.Init(); colourVBO.SetData(colour); indexVBO.Init(); indexVBO.SetData(index); // setup shader this.shader.Init( @"LineBuffer.glsl|VS", @"LineBuffer.glsl|FS", new List <Variable> { new Variable(0, "vertex"), new Variable(1, "colour") }); }