DirectX11 ClearRenderTargetViewback with transparent buffer?
问题 I'm trying to create a window that uses directx to draw opaque content on top of a transparent view (i.e. the desktop shows through). With DirectX11 I'm trying to do the following, but it's not making the background transparent. In fact, any opacity value I put in gives me the exact same results. What I'm doing: float color[4] = { 0.0f, 0.0f, 0.0f, 0.0f }; deviceContext->ClearRenderTargetView(backBuffer, color); Working repro code (main.cpp): #include <Windows.h> #include <windowsx.h> #pragma