有什么方法可以找到有关警告的更多详细信息:ID3D10Buffer::SetPrivateData:发现现有的同名但大小不同的私有数据!
当我在调试模式下运行 DirectX10 程序时,我遇到此错误:
D3D10: 警告: ID3D10Buffer::SetPrivateData: 发现现有的同名不同大小的私有数据! [ STATE_SETTING WARNING #55: SETPRIVATEDATA_CHANGINGPARAMS ]
我正在尝试使该项目高度 OOP 作为学习练习,因此有可能发生这种情况,但有没有办法获得更多详细信息?
I'm encountering this error when I'm running my DirectX10 program in debug mode:
D3D10: WARNING: ID3D10Buffer::SetPrivateData: Existing private data of same name with different size found! [ STATE_SETTING WARNING #55: SETPRIVATEDATA_CHANGINGPARAMS ]
I'm trying to make the project highly OOP as a learning exercise, so there's a chance that this may be occurring, but is there a way to get some more details?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
看来此警告是由 D3DX10CreateSprite 引发的,该警告由 font->DrawText 内部调用
你可以忽略这个警告,似乎是Ms代码中的一个错误:)
Direct3D11不再有内置的文本渲染,所以你以后不会遇到它。
It appears this warning is raised by D3DX10CreateSprite, which is internally called by font->DrawText
You can ignore this warning, seems to be a bug in the Ms code :)
Direct3D11 doesn't have built-in text rendering anymore, so you won't encounter it in the future.
由于这是 D3D11 警告,因此您始终可以使用
ID3D11InfoQueue
将其关闭:请参阅 此页面了解更多信息。我在谷歌搜索答案时发现了你的问题,并且必须进行更多搜索才能找到上面的代码片段,希望这会对某人有所帮助:)
Since this is a D3D11 warning, you could always turn it off using
ID3D11InfoQueue
:See this page for more. I found your question while googling for the answer and had to search a bit more to find the above snippet, hopefully this will help someone :)
您正在寻找或感兴趣哪些其他数据?
该警告非常清楚地说明了正在发生的情况,但如果您想寻找更多数据,可能需要尝试一些方法。
尝试使用相同的名称调用
ID3D10Buffer::GetPrivateData
或执行其他检查以查看是否已存在具有该名称的数据,如果有,内容是什么。将结果打印到文件、输出窗口或控制台。这可以与断点结合起来查看重复发生的位置(当已经有数据时中断)。您可能(不是肯定的)能够将 D3D 运行时设置为调试模式并在出现警告时中断(不确定它是否可以执行警告或仅执行错误)。在 VS 或您喜欢的调试器中调试您的应用程序,当显示警告时,它将中断,您可以查看参数。
检查您的代码并跟踪对
ID3D10Buffer::SetPrivateData
的所有调用,并查看是否有任何明显的重复项。如果有,请研究程序流程,看看为什么以及可以对它们做什么(在使用前一种方法知道从哪里开始之后,这可能效果最好)。您的数据名称是如何设置的?缓冲区的用途是什么?检查其中之一或两者可能会导致您在某个地方发生冲突。
您也可以尝试独角兽,众所周知它们可以帮助解决此类问题。
What other data are you looking for or interested in?
The warning is pretty clear about what is going on, but if you want to hunt down a bit more data, there may be a few things to try.
Try calling
ID3D10Buffer::GetPrivateData
with the same name or do some other check to see if there is data with that name already, and if so, what the contents are. Print your results to a file, output window, or console. This may be combined with breakpoints to see where the duplicate is occurring (break when there's already data).You may (not positive) be able to set the D3D runtimes to debug mode and to break on warnings (not sure if it can do warnings or just errors). Debug your app in VS or your preferred debugger, and when the warning is shown, it will break and you can look at the parameters.
Go through your code and track down all calls to
ID3D10Buffer::SetPrivateData
and look to see if there are any obvious duplicates. If there are, work up the program flow and see why and what you can do about them (this may work best after you use one of the former methods to know where to start).How are your data names set up, and what is the buffer used for? Examining one or both may lead you to a conflict somewhere.
You may also try unicorns, they've been known to help with this kind of problem.