Posted: 4th Jun 2022 7:32
The ability to dump an entire array into a memblock at once could be nice.
I've noticed that 50-70% of my mesh-generation function's time is spent copying 1 value at a time into a memblock.

Assuming the MeshMemblock header has been setup with attribute strings:
+ Code Snippet
SetMeshMemblockVertexDataFromArray( MemID, "AttributeString", DataType, Components, ArrayToDump )
    MemID           = Memblock Index
    AttributeString = String of Attribute from AttributeTable in memblock header.
    DataType        = 0 = Float, 1 = 32bit Integer AaBbGgRr Color           (Probably don't need these, as this info can be gathered from attribute table.)
    Components      = 1 to 4 (probably unused by Color Datatype)            (Probably don't need these, as this info can be gathered from attribute table.)
    ArrayToDump     = Array of floats or integers to dump.


Example:
+ Code Snippet
vPos AS FLOAT[8]

vPos[0] = 0.0  // Vertex 0
vPos[1] = 0.0
vPos[2] = 0.0
vPos[3] = 1.0  // Vertex 1
vPos[4] = 0.0
vPos[5] = 0.0
vPos[6] = 1.0  // Vertex 2
vPos[7] = 1.0
vPos[8] = 0.0

SetMeshMemblockVertexDataFromArray( MyMeshMemBlock, "position", 0, 3, vPos )
Posted: 4th Jun 2022 18:39
Not quite what you asked for, but I'll point out these in case you didn't know about them (I had forgotten about them myself):
SetMeshMemblockVertexPosition
SetMeshMemblockVertexColor
SetMeshMemblockVertexNormal
SetMeshMemblockVertexUV

Not quite the reduction of calls, but does reduce it somewhat.
Posted: 11th Jun 2022 0:00
Thanks, down to 14ms from 16ms for memblock setup.
Though, I do have a few custom attributes which must still be inserted one at a time.