Пример #1
0
 /// <summary>
 /// Uploads the data to GPU.
 /// </summary>
 public override void UploadDataToGPU()
 {
     Vao.ChangeData(BufferTarget.ArrayBuffer, Verticies.ToArray());
     ChangeAttribute(BufferTarget.ArrayBuffer, "position", 2,
                     VertexAttribPointerType.Float, true, 4 * sizeof(float), 0);
     ChangeAttribute(BufferTarget.ArrayBuffer, "texcoord", 2,
                     VertexAttribPointerType.Float, true, 4 * sizeof(float), 2 * sizeof(float));
 }
 public override void UploadDataToGPU()
 {
     Vao.ChangeData(BufferTarget.ArrayBuffer, Verticies.ToArray());
     this.ChangeAttribute(BufferTarget.ArrayBuffer, "position", 2,
                          VertexAttribPointerType.Float, false, 6 * sizeof(float), 0);
     this.ChangeAttribute(BufferTarget.ArrayBuffer, "vertexColor", 4,
                          VertexAttribPointerType.Float, false, 6 * sizeof(float), 2 * sizeof(float));
 }