Repository navigation
|
Hi, is there a working sample using KNI embedded in WPF (net core)? I'm trying to use something like https://github.com/damian-666/monogame-framework-wpfinterop It uses reflection in D3D11Host.cs to access some MonoGame internals (_d3dContext, ...) but as on KNI those variables are on different places, it just crashes. I've located the _d3dContext and I've been able to get some internals through reflection (strategy, context) to get to _d3dContext, but I get lost in the middle because I'm not familiar with KNI's structure. Thanks! |
Replies: 2 comments 1 reply
|
stupid me... I just found that you don't need to juggle as with MG to get the device context :) This does the trick for the d3d context And this for the texture There's another function for a multisampled texture but I can pass without it for the moment :) |
|
Thanks, the version I'm using has some annoying flickering when resizing that I'm not able to find, I'll try the library as soon as I can :) |
Hello @jordi-z80
I see you found the DX extensions.
FYI, I have a library for embedding KNI in WPF apps.
Here is a the sample https://github.com/nkast/ProtonType.Aether/tree/main/Samples/WpfInterop
The library is in the same repo.