コード例 #1
0
        /// <summary>
        /// Creates a new device object that can be used to create other Microsoft DirectComposition objects.
        /// </summary>
        /// <param name="renderingDevice">An optional reference to a DirectX device to be used to create DirectComposition surface
        /// objects. Must be a reference to an object implementing the <strong><see cref="SharpDX.DXGI.Device"/></strong> or
        /// <strong><see cref="SharpDX.Direct2D1.Device"/></strong> interfaces.</param>
        public Device3(ComObject renderingDevice)
        {
            IntPtr temp;

            DComp.CreateDevice3(renderingDevice, Utilities.GetGuidFromType(typeof(Device3)), out temp);
            NativePointer = temp;
        }
コード例 #2
0
        /// <summary>
        /// Creates a new device object that can be used to create other Microsoft DirectComposition objects.
        /// </summary>
        /// <param name="device">The DXGI device to use to create DirectComposition surface objects.</param>
        public Device(DXGI.Device device)
        {
            IntPtr temp;

            DComp.CreateDevice(device, Utilities.GetGuidFromType(typeof(Device)), out temp);
            NativePointer = temp;
        }
コード例 #3
0
ファイル: DesktopDevice.cs プロジェクト: zmtzawqlp/SharpDX
        /// <summary>
        /// Creates a new device object that can be used to create other Microsoft DirectComposition objects.
        /// </summary>
        /// <param name="renderingDevice">An optional reference to a DirectX device to be used to create DirectComposition surface objects. Must be a reference to an object implementing the <strong><see cref="SharpDX.DXGI.Device"/></strong> or <strong><see cref="SharpDX.Direct2D1.Device"/></strong> interfaces.</param>
        public DesktopDevice(ComObject renderingDevice)
            : base(IntPtr.Zero)
        {
            IntPtr temp;

            DComp.CreateDevice2(renderingDevice, Utilities.GetGuidFromType(typeof(DesktopDevice)), out temp);
            NativePointer = temp;
        }