问题描述
问候
我已经阅读过WPF使用DirectX,所以我想知道是否可以使用WPF创建游戏叠加层.我已经尝试过单独使用Winforms或WPF,并且透明窗体或Windows总是会给流软件带来问题,因此我想知道是否可以执行以下操作:
I've read WPF utilizes DirectX so I'm wondering if it is possible to create a Game Overlay with WPF. I have tried with Winforms or WPF by itself and the transparent forms or windows always cause problems for streaming software thus I'm wondering is it possible to do the following:
创建一个WPF应用程序,该程序在桌面上显示一个窗口,其中包含叠加层所需的所有选项.填满所有选项后,您可以按Update(更新),然后在游戏中创建叠加层,上面包含所有信息. WPF应用程序本身将在流中不可见.这意味着当广播公司更改设置时,所有观看者都不会遇到任何麻烦.
Create a WPF application which shows a Window on the desktop with all the options needed for the overlay. Once all the options is filled in you can press Update and the Overlay is created in the game with all the information on it. The WPF app itself won't be visible on the stream. This means all the viewers will not have any trouble with it when the broadcaster changes settings.
有关叠加层的更多信息
叠加层将是一个记分板,因此需要一定量的信息.例如:
More about the overlay
The overlay will be a scoreboard so it will need a set amount of info. For example:
所以总结我的问题
-
我可以制作一个WPF应用程序吗动态创建DirectX叠加层游戏中?
Can I make a WPF application whichdynamically creates a DirectX overlayingame?
由于它需要在DirectX9中工作,这个项目可以通过单一开发者(我)几乎没有DirectX没经验吗?
Since it needs to work in DirectX9,is this project possible to make by asingle dev (me) which has little tono exp with DirectX?
如果可能,我应该在哪里开始吗?
If it is possible, where should Istart?
提前感谢您所有可能的见解和答复!
Thanks in advance for all your possible insights and replies!
推荐答案
使用 D3DImage .它允许您在WPF中托管任何Direct3D内容,还可以使您的图层具有透明性. 这是一个简单的示例.
What you want would be possible using D3DImage. It allows you to host any Direct3D content within WPF and also allows you to have overlay with transparency. Here is a simple example.
这篇关于WPF和DirectX-游戏叠加的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!