Newer API's like D3D11 force use of vertex buffers.
You can use static (contents don't change) or dynamic vertex buffers (contents can be updated and changed by CPU).
My question is, how many vertex开发者_Python百科 buffers is too many? How do you know you are approaching the limit? Should every model have its own vertex buffer? Should you only have something like, say 8, vertex buffers and share them between all models, updating as necessary?
you should not have a new vertex buffer for every object, no.. However you will need one for every texture. And you're going to want to fill them up with as much as you can. Also 8 is not too much!
You don't need a different vb for every texture. You can draw subsets using additional arguments that offset into a buffer, and draw a given number of vertices from that buffer. Set texture between any subsequent calls to drawindexedprimitive.
精彩评论