D3D11RenderContext does not properly clear the depth buffer?
Posted: 01 Mar 2019, 19:10
I tried following the "Integration" sample and integrate my own D3D11 rendering logics with noesis engine.
I have 2 questions:
1. The integration sample uses a Noesis::RenderContext object. I could not find how to create this object using my own D3D11DeviceContext & D3D11Device.
I currently added my own custom factory function to the NoesisApp::D3D11RenderContext code that accepts native handles to these objects. Is this the right approach?
2. The same sample has a RenderView() function thar calls D3D11RenderContext::SetDefaultRenderTarget. this function seems to not clear the depth buffer properly as eveything I draw fails the depth test. Again after fixing the noesis code to do insead of everything renders ok (for now) but I am afraid I'm missing something.
I have 2 questions:
1. The integration sample uses a Noesis::RenderContext object. I could not find how to create this object using my own D3D11DeviceContext & D3D11Device.
I currently added my own custom factory function to the NoesisApp::D3D11RenderContext code that accepts native handles to these objects. Is this the right approach?
2. The same sample has a RenderView() function thar calls D3D11RenderContext::SetDefaultRenderTarget. this function seems to not clear the depth buffer properly as eveything I draw fails the depth test. Again after fixing the noesis code to do
Code: Select all
mContext->ClearDepthStencilView(mDepthStencil, D3D11_CLEAR_DEPTH | D3D11_CLEAR_STENCIL, 1.0f, 0);Code: Select all
mContext->ClearDepthStencilView(mDepthStencil, D3D11_CLEAR_STENCIL, 0.0f, 0);