I’ve just read the specifications for the proposed Aux buffers in OGL 2 and I came across this idea.
When using vertex arrays or vertex buffers, the actual T&L is performed when the indices are sent and thus vertices can be T&Led more than once (thus the use of strips to lower that number). Wouldn’t it be more efficient to T&L the vertices when they are sent, in a batch. Afterwards, the primitives or indices would directly use the T&Led version.
The sequence would look something like this (using the conventional vertex arrays):
glNormalPointer(bla, bla, bla)…
glColorPointer(bla, …)
glTexCoordPointer(…)
glVertexPointer(…) -> creation of the internal cached list of T&Led vertices in the OGL driver. Just like a call to glVertex triggers the T&L of the vertex, glVertexPointer would do the same on the lot.
Then glDrawElements(…) would use directly the T&Led version.
Of course that would imply that the current gl…Pointer() functions also send the number of elements in the arrays and not just the pointer. Also the vertices would have to be reT&Led each time a glDrawElement (or equivalent) is called and the matrix stacks have changed (or vertex program)…
What do you think?