theres a function in processing:
i looking for a similar function in openframeworks. i dont know exactly what it does. but i could not find any openGl reference.
By default, all vertices are sent to the vertex shader already multiplied by the modelview matrix, and the modelview matrix in the vertex shader is set to the identity to avoid applying the transformation twice.
The reason for this seemingly puzzling approach is to optimize performance when drawing multiple shapes: since it is most efficient to minimize the number of buffer copies between CPU and GPU memory, the renderer batches as many shapes together as possible to draw them in a single call. However, if each shape had a different transformation, then it wouldn’t be possible to group them because they would have different uniform matrices. You can disable the batching with
hint(DISABLE_OPTIMIZED_STROKE). More here.