Beispiel #1
0
 public override void LoadData(uint[] indices)
 {
     Bind();
     GL.bufferData(GL.ELEMENT_ARRAY_BUFFER, new Uint32Array(indices), BufferUsage.ToWebGL());
     IndexType = IndexType.UnsignedInt;
     Count     = indices.Length;
 }
Beispiel #2
0
 public override void LoadData <T>(T[] data, VertexFormat vertexFormat)       // where T : struct // TODO - add this back in .NET Core 3.0
 {
     Bind();
     GL.bufferData(GL.ARRAY_BUFFER, ConvertVertices(data, vertexFormat), BufferUsage.ToWebGL());
 }
Beispiel #3
0
 public override void LoadData(ArrayBuffer data)
 {
     Bind();
     GL.bufferData(GL.ARRAY_BUFFER, data, BufferUsage.ToWebGL());
 }
Beispiel #4
0
 public override void LoadData(byte[] data)
 {
     Bind();
     GL.bufferData(GL.ARRAY_BUFFER, new Uint8Array(data), BufferUsage.ToWebGL());
 }