Reputation: 330
When creating multiple objects on screen (With different vertex lists, not re-using the same vertices) would you define a separate buffer description for each new set of vertices then call DrawIndexed()
?
Currently, I'm trying to wrap this up in a function. I'm a bit confused as how to abstract "ownership" from a local matrix to each new instance of geometry buffer:
Additionally, is calling DrawIndexed()
multiple times (for each object) in a class member acceptable methodology , or is calling DrawIndexed()
and referencing the start element.
To sum up, what is the standard (or similar) for drawing multiple transformable geometry in DirectX 11?
Edit: Pseudo-code welcome if necessary; I think I've an idea, but nervous about implementation. (Whether or not it's optimized)
Upvotes: 1
Views: 1554
Reputation: 330
The purpose of this question was to find the way around a perceived limitation to the DirectX11 pipeline that only one Vertex and Index Buffer can be accepted into the pipeline. After some coding, the sandbox world of C++ and the DirectX11's sandbox mentality stands consistent, and the pipeline accepts as many buffers as necessary.
The problem was resolved, storing an object data class and a global dynamic structure logging all objects and their properties registered into the world. The object class created the "ownership" through natural data separation per class instance.
For future eyes.
Upvotes: 2