I am practicing drawing in Direct3D9, and ran into a little problem.
For example, the first parameter in d3ddev->SetStreamSource(1, NULL, 0, sizeof(CUSTOMVERTEX)); is to specify the "data stream", but I don't know what that is.
I've got it drawing the shape I want, but I still don't understand what "data stream" means.
This was called "Multistream" Vertex Buffers back in the day. This basically lets the GPU build up each vertex during drawing from more than one Vertex Buffer.
A simple example using Direct3D 11 (the concept is the same) would be different VBs for each component:
can be described by an input layout:
Which internally maps to a Vertex Shader input like:
At runtime this requires you bind THREE VertexBuffers each of which can have their own 'vertex stride'. Each Vertex Buffer has to have enough entries to match the number of vertices you are drawing.