Browse Source

check for windows 10 to decide to use windows.ui.comp tree to render into.

tmp-winuicomp_with_manual_fbo
Dan Walmsley 6 years ago
parent
commit
b0bc3f4ea8
  1. 20
      src/Windows/Avalonia.Win32/WindowImpl.cs

20
src/Windows/Avalonia.Win32/WindowImpl.cs

@ -104,17 +104,17 @@ namespace Avalonia.Win32
_framebuffer = new FramebufferManager(_hwnd); _framebuffer = new FramebufferManager(_hwnd);
if (Win32GlManager.EglFeature != null) if (Win32GlManager.EglFeature != null)
{
_gl = new CompositionEglGlPlatformSurface(Win32GlManager.EglFeature.DeferredContext, this);
}
if (_gl is CompositionEglGlPlatformSurface cgl)
{
cgl.AttachToCompositionTree(_hwnd);
}
else
{ {
CompositionHost.Instance.InitialiseWindowCompositionTree(_hwnd); if (Win32Platform.WindowsVersion.Major >= 10)
{
var cgl = new CompositionEglGlPlatformSurface(Win32GlManager.EglFeature.DeferredContext, this);
cgl.AttachToCompositionTree(_hwnd);
_gl = cgl;
}
else
{
_gl = new EglGlPlatformSurface(Win32GlManager.EglFeature.DeferredContext, this);
}
} }
Screen = new ScreenImpl(); Screen = new ScreenImpl();

Loading…
Cancel
Save