Commit e371100e authored by Steve Lhomme's avatar Steve Lhomme

direct3d11: always call OMSetRenderTargets before rendering

parent 28c9665a
......@@ -1107,6 +1107,8 @@ static void DisplayD3DPicture(vout_display_sys_t *sys, d3d_quad_t *quad, ID3D11S
UINT stride = sizeof(d3d_vertex_t);
UINT offset = 0;
ID3D11DeviceContext_OMSetRenderTargets(sys->d3d_dev.d3dcontext, 1, &sys->d3drenderTargetView, sys->d3ddepthStencilView);
/* Render the quad */
/* vertex shader */
ID3D11DeviceContext_IASetVertexBuffers(sys->d3d_dev.d3dcontext, 0, 1, &quad->pVertexBuffer, &stride, &offset);
......@@ -1278,8 +1280,6 @@ static void Prepare(vout_display_t *vd, picture_t *picture, subpicture_t *subpic
/* no ID3D11Device operations should come here */
ID3D11DeviceContext_OMSetRenderTargets(sys->d3d_dev.d3dcontext, 1, &sys->d3drenderTargetView, sys->d3ddepthStencilView);
ID3D11DeviceContext_ClearDepthStencilView(sys->d3d_dev.d3dcontext, sys->d3ddepthStencilView, D3D11_CLEAR_DEPTH | D3D11_CLEAR_STENCIL, 1.0f, 0);
/* Render the quad */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment