I was thinking about how to render multiple objects. Things like sprites, truck models, plane models, boats models, etc. And I'm not too sure about this process
Let's say I have a vector of Models objects
class Model
{
Matrix4 modelMat;
VertexData vertices;
Texture texture;
Shader shader;
};
Since each model has is own model matrix, as all models should, does this mean I now need to have 1 draw call per model?
Because each model that needs to be drawn could change the MVP matrix used by the bound vertex shader. Meaning I have to keep updating/mapping the constant buffer my MVP matrix is stored in, which is used by the vertex shader
Am I thinking about all of this wrong? Isn't this horribly inefficient?
↧