Robert Bragg
2f367cc802
[journal] Always pad our vertex data as if at least 2 layers are enabled
The number of material layers enabled when logging a quad in the journal determines the stride of the corresponding vertex data (since we need a set of texture coordinates for each layer.) By padding data in the case where we have only one layer we can avoid a change in stride if we are mixing single and double layer primitives in a scene (e.g. relevent for a composite manager that may use 2 layers for all shaped windows) Avoiding stride changes means we can minimize calls to gl{Vertex,Color}Pointer when flushing the journal. Since we need to update the texcoord pointers when the actual number of layers changes, this adds another batch_and_call() stage to deal with glTexCoordPointer and enabling/disabling the client arrays.
Description
Languages
C
98.9%
Meson
0.7%
Python
0.3%