예제 #1
0
 public int CreateSwapChain(IntPtr pDevice, ref DXGI_SWAP_CHAIN_DESC pDesc, ref IntPtr ppSwapChain)
 {
     if (m_CreateSwapChainFunc == null)
     {
         var fp = GetFunctionPointer(10);
         m_CreateSwapChainFunc = (CreateSwapChainFunc)Marshal.GetDelegateForFunctionPointer(fp, typeof(CreateSwapChainFunc));
     }
     return(m_CreateSwapChainFunc(m_ptr, pDevice, ref pDesc, ref ppSwapChain));
 }
예제 #2
0
 public int GetDesc(ref DXGI_SWAP_CHAIN_DESC pDesc)
 {
     if (m_GetDescFunc == null)
     {
         var fp = GetFunctionPointer(12);
         m_GetDescFunc = (GetDescFunc)Marshal.GetDelegateForFunctionPointer(fp, typeof(GetDescFunc));
     }
     return(m_GetDescFunc(m_ptr, ref pDesc));
 }
예제 #3
0
 public static extern int D3D11CreateDeviceAndSwapChain(
     IntPtr pAdapter,
     D3D_DRIVER_TYPE DriverType,
     HINSTANCE Software,
     uint Flags,
     ref D3D_FEATURE_LEVEL pFeatureLevels,
     uint FeatureLevels,
     uint SDKVersion,
     ref DXGI_SWAP_CHAIN_DESC pSwapChainDesc,
     ref IntPtr ppSwapChain,
     ref IntPtr ppDevice,
     ref D3D_FEATURE_LEVEL pFeatureLevel,
     ref IntPtr ppImmediateContext
     );