The amateur programmer
The amateur programmer

Reputation: 1308

Is this proper approach to draw multiple models in d3d11?

I'm making my 3d model class in c++ for direct3d11. I'm planning to create a vertex and index buffers for each of my models and then bind those buffers into input assembler stage of the compiler. Is this correct approach for rendering multiple 3d models onto screen?

Upvotes: 0

Views: 316

Answers (1)

MooseBoys
MooseBoys

Reputation: 6793

Yes, this is a reasonable approach. As you add more to your scene, you may want to eventually abstract the vertex and index buffers so you can share the same buffers between multiple models.

Also, you'll be binding the buffers to the input assembler stage of the pipeline, not the compiler. The compiler compiles the various shader stage programs that you write (e.g. vertex shader, pixel shader).

Upvotes: 1

Related Questions