setC method

Copies the fields of the native struct o into this instance.

Implementation

@override
RlVertexBufferD setC(RlVertexBufferC o) {
  onOriginalPointer((p) {
    p.ref.vertices = o.vertices;
    p.ref.texcoords = o.texcoords;
    p.ref.normals = o.normals;
    p.ref.colors = o.colors;
    p.ref.indices = o.indices;
  });
  elementCount = o.elementCount;
  vertices = o.vertices.address != 0
    ? .generate(o.verticesCount, (i) => o.vertices[i].toDouble())
    : [];
  texcoords = o.texcoords.address != 0
    ? .generate(o.texcoordsCount, (i) => o.texcoords[i].toDouble())
    : [];
  normals = o.normals.address != 0
    ? .generate(o.normalsCount, (i) => o.normals[i].toDouble())
    : [];
  colors = o.colors.address != 0
    ? .generate(o.colorsCount, (i) => o.colors[i])
    : [];
  indices = o.indices.address != 0
    ? .generate(o.indicesCount, (i) => o.indices[i])
    : [];
  vaoId = o.vaoId;
  vboId = .generate(vboIdCount, (i) => o.vboId[i]);
  return this;
}