Exemple #1
0
        public virtual int GetDesc(
            out DXGI_SWAP_CHAIN_DESC pDesc
            )
        {
            var fp = GetFunctionPointer(12);

            if (m_GetDescFunc == null)
            {
                m_GetDescFunc = (GetDescFunc)Marshal.GetDelegateForFunctionPointer(fp, typeof(GetDescFunc));
            }

            return(m_GetDescFunc(m_ptr, out pDesc));
        }
Exemple #2
0
        public virtual int CreateSwapChain(
            IUnknown pDevice,
            out DXGI_SWAP_CHAIN_DESC pDesc,
            out IDXGISwapChain ppSwapChain
            )
        {
            var fp = GetFunctionPointer(10);

            if (m_CreateSwapChainFunc == null)
            {
                m_CreateSwapChainFunc = (CreateSwapChainFunc)Marshal.GetDelegateForFunctionPointer(fp, typeof(CreateSwapChainFunc));
            }
            ppSwapChain = new IDXGISwapChain();
            return(m_CreateSwapChainFunc(m_ptr, pDevice != null ? pDevice.Ptr : IntPtr.Zero, out pDesc, out ppSwapChain.PtrForNew));
        }