diff --git a/libobs-d3d11/d3d11-rebuild.cpp b/libobs-d3d11/d3d11-rebuild.cpp index 03824c42c..effaff844 100644 --- a/libobs-d3d11/d3d11-rebuild.cpp +++ b/libobs-d3d11/d3d11-rebuild.cpp @@ -53,6 +53,13 @@ inline void gs_texture_2d::Rebuild(ID3D11Device *dev) if (isRenderTarget) InitRenderTargets(); + + if (isGDICompatible) { + hr = texture->QueryInterface(__uuidof(IDXGISurface1), + (void**)&gdiSurface); + if (FAILED(hr)) + throw HRError("Failed to create GDI surface", hr); + } } inline void gs_zstencil_buffer::Rebuild(ID3D11Device *dev)