Beispiel #1
0
        public virtual int CreateSwapChainForComposition(
            IUnknown pDevice,
            ref DXGI_SWAP_CHAIN_DESC1 pDesc,
            IDXGIOutput pRestrictToOutput,
            out IDXGISwapChain1 ppSwapChain
            )
        {
            var fp = GetFunctionPointer(24);

            if (m_CreateSwapChainForCompositionFunc == null)
            {
                m_CreateSwapChainForCompositionFunc = (CreateSwapChainForCompositionFunc)Marshal.GetDelegateForFunctionPointer(fp, typeof(CreateSwapChainForCompositionFunc));
            }
            ppSwapChain = new IDXGISwapChain1();
            return(m_CreateSwapChainForCompositionFunc(m_ptr, pDevice != null ? pDevice.Ptr : IntPtr.Zero, ref pDesc, pRestrictToOutput != null ? pRestrictToOutput.Ptr : IntPtr.Zero, out ppSwapChain.PtrForNew));
        }
Beispiel #2
0
        public virtual int CreateSwapChainForHwnd(
            IUnknown pDevice,
            IntPtr hWnd,
            ref DXGI_SWAP_CHAIN_DESC1 pDesc,
            ref DXGI_SWAP_CHAIN_FULLSCREEN_DESC pFullscreenDesc,
            IDXGIOutput pRestrictToOutput,
            out IDXGISwapChain1 ppSwapChain
            )
        {
            var fp = GetFunctionPointer(15);

            if (m_CreateSwapChainForHwndFunc == null)
            {
                m_CreateSwapChainForHwndFunc = (CreateSwapChainForHwndFunc)Marshal.GetDelegateForFunctionPointer(fp, typeof(CreateSwapChainForHwndFunc));
            }
            ppSwapChain = new IDXGISwapChain1();
            return(m_CreateSwapChainForHwndFunc(m_ptr, pDevice != null ? pDevice.Ptr : IntPtr.Zero, hWnd, ref pDesc, ref pFullscreenDesc, pRestrictToOutput != null ? pRestrictToOutput.Ptr : IntPtr.Zero, out ppSwapChain.PtrForNew));
        }