Ejemplo n.º 1
0
        public virtual int GetDesc1(
            out DXGI_SWAP_CHAIN_DESC1 pDesc
            )
        {
            var fp = GetFunctionPointer(18);

            if (m_GetDesc1Func == null)
            {
                m_GetDesc1Func = (GetDesc1Func)Marshal.GetDelegateForFunctionPointer(fp, typeof(GetDesc1Func));
            }

            return(m_GetDesc1Func(m_ptr, out pDesc));
        }
Ejemplo n.º 2
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));
        }
Ejemplo n.º 3
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));
        }