idxgifactory2 :: CreateSwapChainForHwnD失败

发布于 2025-01-27 21:48:29 字数 1055 浏览 7 评论 0 原文

htttttts> htttts> a >

链接将您带到我的OneDrive,您可以在其中下载我的Visual Studio 2022解决方案和项目(它是17.7kb的.7Z文件),它只有代码可以显示Win32窗口等等。我还提供了一张图像,该图像告诉您我的DirectX规格DirectX诊断工具报告。图像是以下图像:

”我的DirectX

问题是标题所说的,我希望您看看您是否可以毫无问题地编译它,恐怕它可能会失败,因为我无法使用direct3d 11.1(direct3d 11.1要求吗?我找不到有关它的信息),但是后来我尝试使用d3d11_create_device_prevent_prevent_altering_layer_settings_from_from_regrom_registion frag(https://learn.microsoft.com/en-us/windows/win32/api/d3d11/ne-d3d11-d3d11_create_device_flag )仅测试我是否可以使用direct3d 11.1(因为直到direct3d 11.1不支持该标志),而创建成功了...所以我不再知道...

https://1drv.ms/u/s!AkVRV9eGJ20rgTu13uTcNkhp0eZb?e=lwMe70

That links takes you to my OneDrive where you can download my Visual Studio 2022 solution and project (it is a .7z file of 17.7KB), it only has code to display a win32 window and little more. I also included an image that tells you my DirectX specs that the DirectX Diagnostic Tool reports. The image is the following image:

My DirectX specs

The problem is what the title says, I would like you to see if you can compile it without problems, I am afraid that it may be failing because I can't use Direct3D 11.1 (is Direct3D 11.1 a requirement? I can't find information about it), but then I tried creating the D3D device with the D3D11_CREATE_DEVICE_PREVENT_ALTERING_LAYER_SETTINGS_FROM_REGISTRY creation flag (https://learn.microsoft.com/en-us/windows/win32/api/d3d11/ne-d3d11-d3d11_create_device_flag) just to test if I can use Direct3D 11.1 (because that flag is not supported until Direct3D 11.1) and the creation succeeded... so I don't know anymore...

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

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

发布评论

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

评论(1

狠疯拽 2025-02-03 21:48:30

当您使用DirectX进行编程时,请确保您始终启用DEV中的“调试层”,并检查Visual Studio的“输出”窗口(或其他调试器输出)中的输出。

检查以下链接:有关此事的更多信息,因为可以安装它的方式在DirectX版本和数年中发生了变化...

这将向您展示其失败的原因:

必须使用
使用
dxgi_swap_chain_flag_foreground_layer flag。

When you program with DirectX make sure you always enable the "debug layer" in dev and check the output in Visual Studio's "Output" window (or other debugger output).

Check these links: Using the debug layer to debug apps and Direct3D SDK Debug Layer Tricks for more on this as the way it can be installed has changed over DirectX version and years...

This will show you why it fails:

Alpha blended swapchains must be created with
CreateSwapChainForComposition, or CreateSwapChainForCoreWindow with
the DXGI_SWAP_CHAIN_FLAG_FOREGROUND_LAYER flag.

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