I have a task:
'Second component must be written in C++ and must be a UWP assembly/component that will be used by the First part of the task. It must be a DirectX component that draws to SwapChain with transparent background. The content must be a 2D animation that must be bound to current mouse position. The content must be controllable via set of public methods.
DirectX component must be placed on top of your C# GUI so it will act as overlay. Make it event-transparent overlay, it must not capture any GUI events and otherwise interfere with C# app. Use C# host to send mouse events and content change to DX layer.'
But I have no idea how to combine UWP and DirectX. I already have functioning UWP C# app part and what's next?
I'll be grateful for any responces and ideas.
You need to include a SwapChainPanel or SwapChainBackgroundPanel control into your XAML file. This surface will be used to draw your DirectX content. You have a default uwp sample in Visual C++ Template named DirectX 11 and XAML App. It can help you to understand the plumbing but there is only C++ code on this solution.
MonoGame!
It's a game framework, based on XNA4 that works on UWP, among a myriad of other platforms. You can pick apart the samples to learn what you need.
http://www.monogame.net/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With