Delphi - DirectX - OSD/屏幕覆盖
晚上好各位, 我目前正在 Delphi 2010 中开发 NVIDIA GPU 温度监视器。它还将提供来自 WMI 的系统信息。
目前,我正在研究针对不同情况的几种不同的 OSD(屏幕显示)方法。我已经有了两种方法,但我需要另一种专门用于游戏的方法。
我想要做的是使用 Direct2D 或 Direct3D 显示带有一些文本的覆盖层或 OSD。 DLL 注入是有风险的,更不用说完善起来相当棘手了。正如你可以想象的那样,我试图将其覆盖到游戏中,但将其覆盖在任何地方都一样好。
可以想象,使用 Direct2D 或 Direct3D 来叠加会好得多。挂钩是一种想法,但同样,这可能会导致要求我也注入代码。
本质上,我想要在屏幕上显示文本的最简单方法,该方法不会造成严重的性能损失,并且在屏幕刷新时不会闪烁(即呈现新帧)。我也希望能够绘制图像(因为我在我的应用程序中包含图表,输出这些图像将是一个额外的好处,但输出文本是这里的主要任务)。
老实说,我不介意是否需要挂钩和/或注入,但我没有这样做的经验,并且绝对需要很多帮助。做一些类似于 MSI Afterburner 或 FRAPS 所做的事情正是我所追求的。
我也缺乏 DX 编程或设计方面的知识,因此再次需要大量帮助。我已经设计并运行了应用程序的大部分内容,现在的问题是完成这项大任务,并清理其他较小的部分。
有什么想法吗?
编辑:减少段落数量以便于阅读。更多地减少它可能不足以解释这一点。对于看到编辑版本的人,我确实做了大量研究,但没有得出任何结果。
已编辑:没有人提供更多意见吗?是否可以使用用另一种语言编写的 DLL 来输出 OSD,并简单地将我的参数传递给它?如果是这样,我将如何去做,是否有我可以使用的任何语言的示例代码?
Good evening guys,
I'm currently working on an NVIDIA GPU temperature monitor in Delphi 2010. It's also gonna provide system information from WMI.
At present, i'm working on a few different OSD (On-Screen Display) methods for different situations. I've got 2 methods already, but i need another specifically for games.
What i'm wanting to do is display an overlay or OSD with some text using Direct2D or Direct3D. DLL injection is risky, not to mention quite tricky to perfect. As you can imagine, i'm trying to overlay it into games, but overlaying it anywhere would be just as good.
As you can imagine, using Direct2D or Direct3D to overlay it would be much better. Hooking would be one idea but again, that would likely lead to requiring me to inject code too.
Essentially, i want the simplest method of displaying text on screen that doesn't have a hefty performance loss, and doesn't flicker when the screen refreshes (i.e. a new frame is rendered). I'd love to be able to draw images as well (since i include graphs in my app, outputting those would be a bonus but outputting the text is the major task here).
I honestly don't mind if i need to hook and/or inject, but i've no experience with doing so and absolutely would need a lot of help with that. Doing something similar to what MSI Afterburner or FRAPS do would be exactly what i'm after.
I also lack any knowledge of DX programming or design, so again, heavy help is needed there. I've got most of the app designed and working, and it's a matter of finishing up this one large task, and cleaning up the other smaller parts.
Any ideas?
Edited: Reduced the number of paragraphs for easier reading. Reducing it more would likely not explain the point enough. For people seeing the edited version, i did do heavy research but yielded no results.
Edited: No one got any more input? Would it instead be possible to use a DLL written in another language to output the OSD, and simply pass my parameters to it? If so, how would i go about doing so and is there any sample code in any language i could use to work with?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可能想看看Taksi。它有点像开源 FRAPS。是的,涉及代码注入和挂钩。好吧,用 C++ 编写。
You might want to have a look at Taksi. It is sort of an open source FRAPS. And yes, code injection and hooking is involved. And well, written in C++.