I personally find "Consumer" sounds too much like Java's Consumer. Naming it VertexOutput makes it clear that it's the place where you should send your vertex data to while rendering.
Or VertexCache since it is a cache of vertex in where vertex data is organized before it is sent to lwjgl/opengl
It's not necessarily a cache, the interface could in theory be implemented by something that immediately renders the vertices using the corresponding GL command.
The BufferBuilder implementation of it could be called a CacheVertexOutput, though. But we should discuss that on https://github.com/FabricMC/yarn/issues/929.
VertexPipeline then?
Why pipeline? A pipeline would be something with several stages, but here the default implementation is just storing the data in a buffer.
Also, I think "pipeline" is a specific OpenGL term, which is not this.
consumer should suffice then.
sounds too much like Java's
Consumer
hmm, how is this a problem? It does behave like java consumers
It does behave like java consumers
Not really. It behaves more like an OutputStream. It has lots of methods for accepting different types of vertex data (position, color, uv) and it's meant to be implemented by a class that stores things (BufferBuilder), not just an action (BufferBuilder::vertex).
This is the same way Lists don't implement Consumer, but instead you use List::add to get one.
Fabric has a very similar class called QuadEmitter, so maybe we could name it VertexEmitter.
VertexEmitter please!
Most helpful comment
Fabric has a very similar class called
QuadEmitter, so maybe we could name itVertexEmitter.