Reputation: 1308
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
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