コード例 #1
0
ファイル: IDXGISwapChain.cs プロジェクト: ousttrue/ShrimpDX
        public virtual int ResizeTarget(
            ref DXGI_MODE_DESC pNewTargetParameters
            )
        {
            var fp = GetFunctionPointer(14);

            if (m_ResizeTargetFunc == null)
            {
                m_ResizeTargetFunc = (ResizeTargetFunc)Marshal.GetDelegateForFunctionPointer(fp, typeof(ResizeTargetFunc));
            }

            return(m_ResizeTargetFunc(m_ptr, ref pNewTargetParameters));
        }
コード例 #2
0
        public virtual int FindClosestMatchingMode(
            ref DXGI_MODE_DESC pModeToMatch,
            out DXGI_MODE_DESC pClosestMatch,
            IUnknown pConcernedDevice
            )
        {
            var fp = GetFunctionPointer(9);

            if (m_FindClosestMatchingModeFunc == null)
            {
                m_FindClosestMatchingModeFunc = (FindClosestMatchingModeFunc)Marshal.GetDelegateForFunctionPointer(fp, typeof(FindClosestMatchingModeFunc));
            }

            return(m_FindClosestMatchingModeFunc(m_ptr, ref pModeToMatch, out pClosestMatch, pConcernedDevice != null ? pConcernedDevice.Ptr : IntPtr.Zero));
        }
コード例 #3
0
        public virtual int GetDisplayModeList(
            DXGI_FORMAT EnumFormat,
            uint Flags,
            out uint pNumModes,
            out DXGI_MODE_DESC pDesc
            )
        {
            var fp = GetFunctionPointer(8);

            if (m_GetDisplayModeListFunc == null)
            {
                m_GetDisplayModeListFunc = (GetDisplayModeListFunc)Marshal.GetDelegateForFunctionPointer(fp, typeof(GetDisplayModeListFunc));
            }

            return(m_GetDisplayModeListFunc(m_ptr, EnumFormat, Flags, out pNumModes, out pDesc));
        }