Exemple #1
0
        public virtual int CreateDevice(
            IDXGIDevice dxgiDevice,
            out ID2D1Device d2dDevice
            )
        {
            var fp = GetFunctionPointer(17);

            if (m_CreateDeviceFunc == null)
            {
                m_CreateDeviceFunc = (CreateDeviceFunc)Marshal.GetDelegateForFunctionPointer(fp, typeof(CreateDeviceFunc));
            }
            d2dDevice = new ID2D1Device();
            return(m_CreateDeviceFunc(m_ptr, dxgiDevice != null ? dxgiDevice.Ptr : IntPtr.Zero, out d2dDevice.PtrForNew));
        }
Exemple #2
0
 public static extern int D2D1CreateDevice(
     IDXGIDevice dxgiDevice,
     ref D2D1_CREATION_PROPERTIES creationProperties,
     [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(CustomMarshaler <ID2D1Device>))] out ID2D1Device d2dDevice
     );