【问题标题】:Launching SharpDX/DirectX app with DeviceCreationFlags.Debug使用 DeviceCreationFlags.Debug 启动 SharpDX/DirectX 应用程序
【发布时间】:2013-11-06 11:07:45
【问题描述】:

我正在尝试使用 DeviceCreationFlags.Debug 启动我的 directX/SharpDX 应用程序,但我在启动时遇到以下崩溃:

SharpDX.SharpDXException: HRESULT: [0x80004005], Module: [General], ApiCode: [E_FAIL/Unspecified error], Message: Unspecified error

at SharpDX.Result.CheckError()
at SharpDX.Direct3D11.Device.CreateDevice(Adapter adapter, DriverType driverType, DeviceCreationFlags flags, FeatureLevel[] featureLevels)
at SharpDX.Direct3D11.Device..ctor(Adapter adapter, DeviceCreationFlags flags, FeatureLevel[] featureLevels)
at SharpDX.Toolkit.Graphics.GraphicsDevice..ctor(GraphicsAdapter adapter, DeviceCreationFlags flags, FeatureLevel[] featureLevels)
at SharpDX.Toolkit.GamePlatform.CreateDevice(GraphicsDeviceInformation deviceInformation)
at SharpDX.Toolkit.GraphicsDeviceManager.CreateDevice(GraphicsDeviceInformation newInfo)
at SharpDX.Toolkit.GraphicsDeviceManager.ChangeOrCreateDevice(Boolean forceCreate)
at SharpDX.Toolkit.GraphicsDeviceManager.SharpDX.Toolkit.IGraphicsDeviceManager.CreateDevice()
at SharpDX.Toolkit.Game.InitializeBeforeRun()
at SharpDX.Toolkit.GameWindowDesktop.Run()
at SharpDX.Toolkit.GamePlatform.Run(GameContext gameContext)
at SharpDX.Toolkit.Game.Run(GameContext gameContext)
at wrapper.Program.Main(String[] args)

这是在 Win7 32 位上,我确实安装了 June2010 DirextX SDK 和 Runtime 以及适用于 Windows 7 的 Windows SDK。

顺便说一句,这个问题起源于这个:SharpDX crash when rendering h264 video using MediaFoundation

【问题讨论】:

  • 从您的问题来看,我认为它可以在没有调试标志的情况下工作?
  • 是的,它在没有调试标志的情况下运行。

标签: c# directx-11 directx-9 sharpdx


【解决方案1】:

来自 MSDN(D3D11_CREATE_DEVICE_FLAG 上的页面):

D3D11_CREATE_DEVICE_DEBUG

创建一个支持调试层的设备。

要使用此标志,您必须安装 D3D11*SDKLayers.dll;否则,设备创建失败。要获取 D3D11_1SDKLayers.dll,请安装适用于 Windows 8 的 SDK。

这些文件不是 June2010 SDK 的一部分。您必须在其他地方找到它们(即在 Windows 8 SDK 中,如建议的那样)。

【讨论】:

  • 实际上我在 win7 中运行它,并且我确实安装了适用于 Windows 7 的 SDK。无论如何,我会检查这个特定的 dll 是否存在。
  • 你是对的,这个 DLL 似乎丢失了。如果不是 Windows SDK,我在哪里可以得到它?
  • 它说要安装适用于 Windows 8 的 SDK。不知道有没有其他的获取方式。
【解决方案2】:

安装 SDK 的替代方法是安装 Visual Studio 2012 或更高版本。它的安装将安装这些调试库。
这里提到了类似的问题:link => 解释 3

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2012-04-09
    • 1970-01-01
    • 2015-08-04
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多