使用 DirectX IDXGIOutput::GetDisplaySurfaceData 进行 DWM 屏幕捕获

发布于 2024-08-15 14:27:07 字数 278 浏览 3 评论 0原文

我正在尝试使用 Direct3D 10/11 使用 DXGI 和 GetDisplaySurfaceData() 来捕获 DWM 的 DirectX 表面。

但是,当我在调用 GetDisplaySurfaceData() 之前使用 IDXGIOutput::TakeOwnership() 获取适配器输出的所有权时,整个屏幕会暂时黑屏,然后恢复返回(就像在显示模式切换期间一样)。

为什么会发生这种情况,我该如何防止这种情况发生?

I am trying to capture DWM's DirectX surface by using DXGI and GetDisplaySurfaceData() using Direct3D 10/11.

However, when I am taking ownership of the adapter's output with IDXGIOutput::TakeOwnership() before calling to GetDisplaySurfaceData(), the whole screen blacks out for a moment and then restores back (just as during display mode switching).

Why does this happen, and how can I prevent this?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

贵在坚持 2024-08-22 14:27:07

我知道这已经很晚了。但无论如何,文档明确指出您不应该直接调用 TakeOwnership(),因为结果是不可预测的。

http://msdn.microsoft。 com/en-us/library/windows/desktop/bb174558(v=vs.85).aspx

I know this is extremely late. But for what it's worth, the documentation explicitly says that you are not supposed to call TakeOwnership() directly as the results will be unpredictable.

http://msdn.microsoft.com/en-us/library/windows/desktop/bb174558(v=vs.85).aspx

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文