1 hour ago, Infinisearch said:
Also blitted isn't the proper term, the proper term would likely be rendered. Lastly do you mean the render target or the front buffer (the thing that is actually displayed on the screen)?
Not the front buffer, but the actual render target. The thing that is set using OMSetRenderTarget
So now my question is about renderables, depth buffers, and depth in general. I hope what I'm trying to explain makes sense, so feel free to ask any questions.
Lets say I have X different models, where each model has a 2D label above it. The model and the label should be grouped together. So something like:
![models.png.47623a788f61036011fc803aa8b2dc54.png](https://uploads.gamedev.net/monthly_2017_11/models.png.47623a788f61036011fc803aa8b2dc54.png)
And I want to render a ton of these models all at different depths and positions. So I get something that looks roughly like this:
![modelsDepth.png.6e12356ca180d044818478eadbec0087.png](https://uploads.gamedev.net/monthly_2017_11/modelsDepth.png.6e12356ca180d044818478eadbec0087.png)
Where the model/label that is closer to the viewer covers the things behind it
Now my question is if I'm drawing all these models and the 2D labels separately, as in all the draw calls for the models would be executed first, then all the draw calls for the labels would be executed. how does depth come into play?
I know that each model and label has its own depth (z value) and I believe the depth buffer will automatically handle some of this to an extent, but if they are all drawn separate do I lose the desired effect of covering models/labels further away from the viewer with the ones that are closer?
I guess what I'm really asking is how do you mingle 2D and 3D? Would going from one depth to another be considered a state change?