Esempio n. 1
0
        public IDXGISwapChain1 CreateSwapChainForHwnd(
            IUnknown device,
            IntPtr hwnd,
            SwapChainDescription1 description,
            SwapChainFullscreenDescription fullscreenDescription,
            IDXGIOutput restrictToOutput)
        {
            Guard.NotNull(device, nameof(device));
            Guard.IsTrue(hwnd != IntPtr.Zero, nameof(hwnd), "Invalid hwnd handle");
            Guard.NotNull(restrictToOutput, nameof(restrictToOutput));

            return(CreateSwapChainForHwnd(device, hwnd, ref description, fullscreenDescription, restrictToOutput));
        }
        public IDXGIDecodeSwapChain CreateDecodeSwapChainForCompositionSurfaceHandle(
            IUnknown device,
            IntPtr surface,
            IDXGIResource yuvDecodeBuffers,
            IDXGIOutput restrictToOutput)
        {
            Guard.NotNull(device, nameof(device));
            Guard.IsTrue(surface != IntPtr.Zero, nameof(surface), "Invalid surface handle");
            Guard.NotNull(device, nameof(device));
            Guard.NotNull(yuvDecodeBuffers, nameof(yuvDecodeBuffers));
            Guard.NotNull(restrictToOutput, nameof(restrictToOutput));

            // Reserved for future use (https://docs.microsoft.com/it-it/windows/desktop/api/dxgi1_3/ns-dxgi1_3-dxgi_decode_swap_chain_desc)
            var description = new DecodeSwapChainDescription
            {
                Flags = 0
            };

            return(CreateDecodeSwapChainForCompositionSurfaceHandle(device, surface, description, yuvDecodeBuffers, restrictToOutput));
        }
Esempio n. 3
0
        public IDXGISwapChain1 CreateSwapChainForCoreWindow(IUnknown device, IUnknown window, SwapChainDescription1 description, IDXGIOutput restrictToOutput)
        {
            Guard.NotNull(device, nameof(device));
            Guard.NotNull(window, nameof(window));
            Guard.NotNull(restrictToOutput, nameof(restrictToOutput));

            return(CreateSwapChainForCoreWindow(device, window, ref description, restrictToOutput));
        }
Esempio n. 4
0
 public IDXGISwapChain1 CreateSwapChainForComposition(IUnknown device, SwapChainDescription1 description, IDXGIOutput restrictToOutput)
 {
     Guard.NotNull(device, nameof(device));
     Guard.NotNull(restrictToOutput, nameof(restrictToOutput));
     return(CreateSwapChainForComposition(device, ref description, restrictToOutput));
 }
Esempio n. 5
0
 public Result SetFullscreenState(bool fullscreen, IDXGIOutput target = null)
 {
     return(SetFullscreenState(new RawBool(fullscreen), target));
 }
        public IDXGISwapChain1 CreateSwapChainForCompositionSurfaceHandle(IUnknown device, IntPtr surface, SwapChainDescription1 description, IDXGIOutput restrictToOutput)
        {
            Guard.NotNull(device, nameof(device));
            Guard.IsTrue(surface != IntPtr.Zero, nameof(surface), "Invalid surface handle");
            Guard.NotNull(restrictToOutput, nameof(restrictToOutput));

            return(CreateSwapChainForCompositionSurfaceHandle(device, surface, ref description, restrictToOutput));
        }