[vlc-devel] [PATCH] direct3d11: clear the D3D11 view before writing on it

Steve Lhomme robux4 at gmail.com
Fri Aug 14 10:06:59 CEST 2015


In the windows store app the D3D11 view is reused between files
---
 modules/video_output/msw/direct3d11.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/modules/video_output/msw/direct3d11.c b/modules/video_output/msw/direct3d11.c
index c6bf8dc..7b25753 100644
--- a/modules/video_output/msw/direct3d11.c
+++ b/modules/video_output/msw/direct3d11.c
@@ -795,6 +795,9 @@ static void Display(vout_display_t *vd, picture_t *picture, subpicture_t *subpic
 {
     vout_display_sys_t *sys = vd->sys;
 
+    FLOAT blackRGBA[4] = {0.0f, 0.0f, 0.0f, 1.0f};
+    ID3D11DeviceContext_ClearRenderTargetView(sys->d3dcontext, sys->d3drenderTargetView, blackRGBA);
+
     /* no ID3D11Device operations should come here */
 
     ID3D11DeviceContext_OMSetRenderTargets(sys->d3dcontext, 1, &sys->d3drenderTargetView, sys->d3ddepthStencilView);
-- 
2.5.0



More information about the vlc-devel mailing list