Putting a control button into an existing Direct3D application
I would like to overlay my own content above a Direct3D v9 game (made by a third party).
Interactive Overlay Button
Specifically, I would like to overlay a button element with clickable buttons like Steam, although I am trying to keep the interface simpler.
Ideally I could overlay a WPF button or a Windows Form button or the entire UserControl, but if that's not possible, then just create a functional button from primitives.
Text Overlay Working with SharpDX
- I have a working example of a text overlay based on the work of Justin Stanning
- Namely using the SharpDX.Direct3D9.Font DrawText Method
How to Overlay Button or UserControl with SharpDX
I looked at the relevant samples at https://github.com/sharpdx/SharpDX-Samples but couldn't find a way to include or draw custom controls using SharpDX
- Is it possible?
- If not, are there any examples of drawing a clicked button from scratch?
- Please keep in mind that I am new to the DirectX world :)
source to share
Your biggest problem isn't getting the controls to render on top of the DX scene; this will make them respond to input later. You can probably tweak the way you copy images to the DX surface, but I have no idea how you would capture input, translate it, and deliver it back to WPF components. If it is even possible, it is almost certainly more of a problem than it is worth.
There are a couple of Xaml game solutions you can check out. WPF for Games is a C ++-based partial DirectFD-based WPF implementation as well as a proprietary Noesis GUI .
source to share