创建 DirectX 10 设备和交换链时出现的问题
我在使用 D3D10CreateDeviceAndSwapChain 创建有效的 DirectX 10 设备和交换链时遇到一些问题。我认为可能是我的窗口创建出了问题,因为它说提供的 SwapChainDesc 中的 OutputWindow 未使用=??? (或随机 int 值)
这个问题一直让我感到压力,因为我似乎无法找出项目代码出了什么问题
,我知道它在 CDirect3D.cpp 的第 193 行失败,
result = D3D10CreateDeviceAndSwapChain(NULL, D3D10_DRIVER_TYPE_HARDWARE, NULL, 0, D3D10_SDK_VERSION, &swapChainDesc, &this->m_swapChain, &this->m_device);
如果有人可以看一下代码。我已将项目及其源代码上传到 http://dl.dropbox.com /u/3605545/files/LearningEngine.zip
(不是一个巨大的代码库,到目前为止只有 4 个类)
该项目位于 VS2010 中,我使用了 DirectX SDK 2010年6月
I am having some problems with creating a valid DirectX 10 device and swap chain using D3D10CreateDeviceAndSwapChain. I think it might be my window creation that something goes wrong in since it says that the OutputWindow in the supplied SwapChainDesc is unused=??? (or a random int value)
This problem has been stressing me out since I can't seem to find out what is wrong with the project code
I know that it fails at line 193 in CDirect3D.cpp at
result = D3D10CreateDeviceAndSwapChain(NULL, D3D10_DRIVER_TYPE_HARDWARE, NULL, 0, D3D10_SDK_VERSION, &swapChainDesc, &this->m_swapChain, &this->m_device);
I would be very grateful if someone could take a look at the code. I've uploaded the project and its sources at http://dl.dropbox.com/u/3605545/files/LearningEngine.zip
(Not a huge codebase, only 4 classes so far)
The project is in VS2010 and I used the DirectX SDK from June 2010
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我发现了问题,我错误地输入了这一行:
应该是:
I found the problem, I mistyped this line:
Should have been: