microsoft / WPFDXInterop

Repo for WPF DX Interop support
MIT License
307 stars 98 forks source link

How to render yuv data? #38

Open kyl2016 opened 6 years ago

kyl2016 commented 6 years ago

In D3DVisualization_dxsdk.vcxproj, I edit D3DVisualization.cpp,

HRESULT CCube::Render(void pResource, bool isNewSurface, unsigned char yuvData) // add yuvData parameter { ... m_pImmediateDeviceContext->UpdateSubresource(pBackBuffer, 0, NULL, yuvData, 1920, 0); if (NULL != m_pImmediateDeviceContext) { m_pImmediateDeviceContext->Flush(); } }

The display is error, could you help me ?

The source code is D3D11Image.zip

Thank you very much!

kyl2016 commented 5 years ago

I did it, but inefficiency. Improving.