예제 #1
0
        public virtual int GetFullscreenDesc(
            out DXGI_SWAP_CHAIN_FULLSCREEN_DESC pDesc
            )
        {
            var fp = GetFunctionPointer(19);

            if (m_GetFullscreenDescFunc == null)
            {
                m_GetFullscreenDescFunc = (GetFullscreenDescFunc)Marshal.GetDelegateForFunctionPointer(fp, typeof(GetFullscreenDescFunc));
            }

            return(m_GetFullscreenDescFunc(m_ptr, out pDesc));
        }
예제 #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));
        }