I'm trying to properly structure my directx 11 application. So there are all manners of shaders, and gpu resources to bind to like index vertex buffers, input layouts, primitive topology, render target view, depth stencil views, blend states, textures etc.
My question is do we assign a set of all those things per model we want to render, or can they be shared for multiple models?
For example I want to render an opaque cube with some post process material, then a transparent sphere, then 100 opaque cones. The way I'm thinking about I should go about this is create a cube, a sphere and a cone classes, on their constructors bind whatever buffers, shaders and resources they need; clearly each one gets different shaders (different vertex, geometry possibly, pixel shaders), different index/vertex/constant buffers, and different render state blend state and whatnot.
But I wonder can I reuse say the render target view and depth stencil view etc (taking them from say a Graphics class that I have them constructed) for all those 3 types of objects? On the other hand can I render one of them, then completely change DESCriptions for the rendering state of the following models by then render another one then change properties again and render another etc?
So my question basically concerns the granularity of the available gpu resources with the models that I want to render. If you can enlighten me a bit on that taking into account what I've said that would be great.
(DirectX 11, C++)