public CompositionConnector(EglPlatformOpenGlInterface egl)
        {
            EnsureDispatcherQueue();

            if (_dispatcherQueueController != null)
            {
                _compositor = new Compositor();
            }

            var interop = _compositor.As <ICompositorInterop>();

            var display = egl.Display as AngleWin32EglDisplay;

            _graphicsDevice = interop.CreateGraphicsDevice(display.GetDirect3DDevice());
        }
Beispiel #2
0
        public static ICompositionSurface CreateCompositionSurfaceForSwapChain(this Compositor compositor, SharpDX.DXGI.SwapChain1 swapChain)
        {
            var interop = compositor.As <ICompositorInterop>();

            interop.CreateCompositionSurfaceForSwapChain(swapChain.NativePointer, out var raw);
            var result = MarshalInterface <ICompositionSurface> .FromAbi(raw);

            Marshal.Release(raw);
            return(result);
        }
Beispiel #3
0
        public static CompositionTarget CreateDesktopWindowTarget(this Compositor compositor, IntPtr hwnd, bool isTopmost)
        {
            var desktopInterop = compositor.As <ICompositorDesktopInterop>();

            desktopInterop.CreateDesktopWindowTarget(hwnd, isTopmost, out var raw);
            var result = DesktopWindowTarget.FromAbi(raw);

            Marshal.Release(raw);
            return(result);
        }