Posted 03 March 2012 - 08:28 PM
I'm not sure how it works in OpenGL, so I can't comment on that.
In D3D10/D3D11 you're okay as long as the vertex buffer has at least the elements required by the vertex shader, and you always use an input layout created for vertex layout/vertex shader input signature combination. If the vertex buffer doesn't have an element required by the vertex shader, then creating the input layout will fail. So in other words it's okay for a vertex buffer to have too many elements, but not for it to have not enough elements. In D3D9 if you don't have enough elements in your vertex buffer the runtime will just supply 0's for those values, however if you have the debug runtimes enabled it will spew warnings about it.