setIndexBuffer() Function Question

customMesh.setIndexBuffer(indexBuffer.getBuffer(), totalVertices, totalIndices, true);

Can the totalVertices and totalIndices be the maximum possible or do they need to be exact. I would like to not have to pass the exact amount of index or vertices back to the CPU. I am generating that geometry on the GPU.

What is the intended workflow here?

I don’t think it’s a problem to pass a maximum value for these parameters. Note that the total vertices reported by the inspector may be wrong, though, because it’s based on the value you provide to setIndexBuffer.