function createWireframeVertexArray(context, vertexArray, terrainMesh) {
  const indices = terrainMesh.indices;

  const geometry = {
    indices: indices,
    primitiveType: PrimitiveType.TRIANGLES,
  };

  GeometryPipeline.toWireframe(geometry);

  const wireframeIndices = geometry.indices;
  const wireframeIndexBuffer = Buffer.createIndexBuffer({
    context: context,
    typedArray: wireframeIndices,
    usage: BufferUsage.STATIC_DRAW,
    indexDatatype: IndexDatatype.fromSizeInBytes(
      wireframeIndices.BYTES_PER_ELEMENT,
    ),
  });
  return new VertexArray({
    context: context,
    attributes: vertexArray._attributes,
    indexBuffer: wireframeIndexBuffer,
  });
}
Creates a vertex array for wireframe rendering of a terrain tile.

@private

@param {Context} context The context in which to create the vertex array.
@param {VertexArray} vertexArray The existing, non-wireframe vertex array.  The new vertex array
                     will share vertex buffers with this existing one.
@param {TerrainMesh} terrainMesh The terrain mesh containing non-wireframe indices.
@returns {VertexArray} The vertex array for wireframe rendering.