Philipp Neufeld
Philipp Neufeld

Reputation: 1103

DirectX 12 does not draw to the render target

I've got a problem with DirectX 12 I cannot figure out by myself. I wrote a small program that should render a triangle onto the screen. When I executed the application, however, there was no triangle visible. So I launched NVidia's nsight debugger. The weird thing is that the triangle has been drawn to the depth-stencil buffer but not to the back buffer.

enter image description here

If you need any code snippets please write it in the comments and I will post it.

Thanks in advance

Upvotes: 1

Views: 1026

Answers (1)

galop1n
galop1n

Reputation: 8824

You do not give a lot of details to work on, but if your depth buffer got updated, my first guess would be to look at the color write mask.

In D3D12_RENDER_TARGET_BLEND_DESC, you have a member named RenderTargetWriteMask, it has to be set to D3D12_COLOR_WRITE_ENABLE_ALL.

Upvotes: 5

Related Questions