WPF和DirectX-游戏叠加 [英] WPF and DirectX - Game Overlay

查看:196
本文介绍了WPF和DirectX-游戏叠加的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

问候

我已经阅读过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 which dynamically creates a DirectX overlay ingame?

由于它需要在DirectX9中工作, 这个项目可以通过 单一开发者(我)几乎没有 DirectX没经验吗?

Since it needs to work in DirectX9, is this project possible to make by a single dev (me) which has little to no exp with DirectX?

如果可能,我应该在哪里 开始吗?

If it is possible, where should I start?

提前感谢您所有可能的见解和答复!

Thanks in advance for all your possible insights and replies!

推荐答案

使用这是一个简单的示例.

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-游戏叠加的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆