GLWpfControl icon indicating copy to clipboard operation
GLWpfControl copied to clipboard

WinUI 3/.Net5 Support

Open AkshayFT opened this issue 4 years ago • 10 comments

I'm developing a windows application using WinUI3 and .Net5.0. Unable to use this control. Are there any alternatives available or should link any WPF related dlls?

AkshayFT avatar Jul 25 '21 14:07 AkshayFT

WinUI 3 support gets my vote. I've currently taken on an aging WinForms app that uses GLControl 3.x. Would be nice to start investigating migration to WinUI but without this not much point.

PhilPJL avatar May 16 '22 17:05 PhilPJL

What doesn't work? What are the symptoms? Are there any error messages?

NogginBops avatar May 17 '22 10:05 NogginBops

Are you saying that the GLWpfControl should work in WinUI3? If so then that's good and I'll give it a try. I was assuming perhaps incorrectly that WinUI3 needs specific controls.

PhilPJL avatar May 17 '22 12:05 PhilPJL

I don't know much about WinUI3, but it did look like you could use WPF control in it. But maybe I'm mistaken.

NogginBops avatar May 17 '22 19:05 NogginBops

Unfortunately you can't https://github.com/microsoft/microsoft-ui-xaml/issues/5866 You can embed WPF in WinForms and vice-versa, and apparently Xaml islands are planned to allow embedding WinUI in WPF, but not the other way around. I assume a WinUI version of GLControl will therefore be useful.

PhilPJL avatar May 21 '22 08:05 PhilPJL

Any news on this?

a GLControl for WinUI would be awesome.

JuandreG avatar Jul 27 '23 12:07 JuandreG

WinUI doesn't allow you to create an OpenGL context, not sure if there are any workarounds for this. Maybe there is, but I don't know of one.

NogginBops avatar Jul 27 '23 21:07 NogginBops

Interoperability possible using WGL_NV_DX_interop2 that widely supported.

malstraem avatar Jul 28 '23 06:07 malstraem

Interoperability possible using WGL_NV_DX_interop2 that widely supported.

My understanding was that even creating an OpenGL context isn't possible in WinUI 3? But I haven't really looked into it so idk any details.

NogginBops avatar Jul 28 '23 20:07 NogginBops

@NogginBops

creating an OpenGL context isn't possible in WinUI 3

Same as for WPF 🤓

In any case you need to implement the interaction between OpenGL and DirectX. With WinUI you need to get render target from SwapChainPanel and create OpenGL framebuffer using upper mentioned extension.

malstraem avatar Jul 29 '23 06:07 malstraem