/// <summary> /// No documentation. /// </summary> /// <param name = "adapterRef">No documentation.</param> /// <param name = "minimumFeatureLevel">No documentation.</param> /// <param name = "riid">No documentation.</param> /// <param name = "deviceOut">No documentation.</param> /// <returns>No documentation.</returns> /// <unmanaged>HRESULT D3D12CreateDevice([In, Optional] IUnknown* pAdapter,[In] D3D_FEATURE_LEVEL MinimumFeatureLevel,[In] const GUID& riid,[Out, Fast] void** ppDevice)</unmanaged> /// <unmanaged-short>D3D12CreateDevice</unmanaged-short> public static unsafe SharpDX.Result CreateDevice(SharpDX.IUnknown adapterRef, SharpDX.Direct3D.FeatureLevel minimumFeatureLevel, System.Guid riid, SharpDX.Direct3D12.Device deviceOut) { System.IntPtr adapterRef_ = System.IntPtr.Zero; System.IntPtr deviceOut_ = System.IntPtr.Zero; SharpDX.Result __result__; adapterRef_ = SharpDX.CppObject.ToCallbackPtr <SharpDX.IUnknown>(adapterRef); __result__ = D3D12CreateDevice_((void *)adapterRef_, unchecked ((System.Int32)minimumFeatureLevel), &riid, &deviceOut_); (deviceOut).NativePointer = deviceOut_; return(__result__); }
/// <summary> /// <p>Creates a new DirectComposition device object, which can be used to create other DirectComposition objects.</p> /// </summary> /// <param name = "renderingDevice"><dd> <p>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.</p> </dd></param> /// <param name = "iid"><dd> <p>The identifier of the interface to retrieve. This must be one of __uuidof(<see cref = "SharpDX.DirectComposition.Device"/>) or __uuidof(<see cref = "SharpDX.DirectComposition.DesktopDevice"/>).</p> </dd></param> /// <param name = "dcompositionDevice"><dd> <p>Receives an interface reference to the newly created device object. The reference is of the type specified by the <em>iid</em> parameter. This parameter must not be <c>null</c>.</p> </dd></param> /// <returns><p>If this function succeeds, it returns <strong><see cref = "SharpDX.Result.Ok"/></strong>. Otherwise, it returns an <strong><see cref = "SharpDX.Result"/></strong> error code.</p></returns> /// <doc-id>dn958410</doc-id> /// <unmanaged>HRESULT DCompositionCreateDevice3([In, Optional] IUnknown* renderingDevice,[In] const GUID& iid,[Out] void** dcompositionDevice)</unmanaged> /// <unmanaged-short>DCompositionCreateDevice3</unmanaged-short> internal static unsafe void CreateDevice3(SharpDX.IUnknown renderingDevice, System.Guid iid, out System.IntPtr dcompositionDevice) { System.IntPtr renderingDevice_ = System.IntPtr.Zero; SharpDX.Result __result__; renderingDevice_ = SharpDX.CppObject.ToCallbackPtr <SharpDX.IUnknown>(renderingDevice); fixed(void *dcompositionDevice_ = &dcompositionDevice) __result__ = DCompositionCreateDevice3_((void *)renderingDevice_, &iid, dcompositionDevice_); __result__.CheckError(); }
internal unsafe void __MarshalFrom(ref __Native @ref) { if (@ref.EffectPointer != System.IntPtr.Zero) { EffectPointer = new SharpDX.ComObject(@ref.EffectPointer); } else { EffectPointer = null; } InitialState = @ref.InitialState; OutputChannelCount = @ref.OutputChannelCount; }
/// <summary> /// <p> Creates a device that uses Direct3D 11 functionality in Direct3D 12, specifying a pre-existing D3D12 device to use for D3D11 interop. </p> /// </summary> /// <param name = "deviceRef"><dd> <p> Specifies a pre-existing D3D12 device to use for D3D11 interop. May not be <c>null</c>. </p> </dd></param> /// <param name = "flags"><dd> <p> One or more bitwise OR'ed flags from <strong><see cref = "SharpDX.Direct3D11.DeviceCreationFlags"/></strong>. These are the same flags as those used by <strong>D3D11CreateDeviceAndSwapChain</strong>. Specifies which runtime layers to enable. <em>Flags</em> must be compatible with device flags, and its <em>NodeMask</em> must be a subset of the <em>NodeMask</em> provided to the present API. </p> </dd></param> /// <param name = "featureLevelsRef"><dd> <p> An array of any of the following: </p> <ul> <li>D3D_FEATURE_LEVEL_12_1</li> <li>D3D_FEATURE_LEVEL_12_0</li> <li>D3D_FEATURE_LEVEL_11_1</li> <li>D3D_FEATURE_LEVEL_11_0</li> <li>D3D_FEATURE_LEVEL_10_1</li> <li>D3D_FEATURE_LEVEL_10_0</li> <li>D3D_FEATURE_LEVEL_9_3</li> <li>D3D_FEATURE_LEVEL_9_2</li> <li>D3D_FEATURE_LEVEL_9_1</li> </ul> <p> The first feature level which is less than or equal to the D3D12 device's feature level will be used to perform D3D11 validation. Creation will fail if no acceptable feature levels are provided. Providing <c>null</c> will default to the D3D12 device's feature level. </p> </dd></param> /// <param name = "featureLevels"><dd> <p> The size of the feature levels array, in bytes. </p> </dd></param> /// <param name = "commandQueuesOut"><dd> <p> An array of unique queues for D3D11On12 to use. Valid queue types: 3D command queue. </p> </dd></param> /// <param name = "numQueues"><dd> <p> The size of the command queue array, in bytes. </p> </dd></param> /// <param name = "nodeMask"><dd> <p> Which node of the D3D12 device to use. Only 1 bit may be set. </p> </dd></param> /// <param name = "deviceOut"><dd> <p> Pointer to the returned <strong><see cref = "SharpDX.Direct3D11.Device"/></strong>. May be <c>null</c>. </p> </dd></param> /// <param name = "immediateContextOut"><dd> <p> A reference to the returned <strong><see cref = "SharpDX.Direct3D11.DeviceContext"/></strong>. May be <c>null</c>. </p> </dd></param> /// <param name = "chosenFeatureLevelRef"><dd> <p> A reference to the returned feature level. May be <c>null</c>. </p> </dd></param> /// <returns><p> This method returns one of the Direct3D 12 Return Codes that are documented for <strong>D3D11CreateDevice</strong>. See Direct3D 12 Return Codes. </p><p> This method returns <strong><see cref = "SdkComponentMissing"/></strong> if you specify <strong>D3D11_CREATE_DEVICE_DEBUG</strong> in <em>Flags</em> and the incorrect version of the debug layer is installed on your computer. Install the latest Windows SDK to get the correct version. </p></returns> /// <remarks> /// <p> The function signature PFN_D3D11ON12_CREATE_DEVICE is provided as a typedef, so that you can use dynamic linking techniques (GetProcAddress) instead of statically linking. </p> /// </remarks> /// <doc-id>dn933209</doc-id> /// <unmanaged>HRESULT D3D11On12CreateDevice([In] IUnknown* pDevice,[In] unsigned int Flags,[In, Buffer, Optional] const D3D_FEATURE_LEVEL* pFeatureLevels,[In] unsigned int FeatureLevels,[In, Buffer, Optional] const IUnknown** ppCommandQueues,[In] unsigned int NumQueues,[In] unsigned int NodeMask,[Out] ID3D11Device** ppDevice,[Out, Optional] ID3D11DeviceContext** ppImmediateContext,[Out, Optional] D3D_FEATURE_LEVEL* pChosenFeatureLevel)</unmanaged> /// <unmanaged-short>D3D11On12CreateDevice</unmanaged-short> public static unsafe void On12CreateDevice(SharpDX.IUnknown deviceRef, SharpDX.Direct3D11.DeviceCreationFlags flags, SharpDX.Direct3D.FeatureLevel[] featureLevelsRef, System.Int32 featureLevels, SharpDX.IUnknown[] commandQueuesOut, System.Int32 numQueues, System.Int32 nodeMask, out SharpDX.Direct3D11.Device deviceOut, out SharpDX.Direct3D11.DeviceContext immediateContextOut, out SharpDX.Direct3D.FeatureLevel chosenFeatureLevelRef) { System.IntPtr deviceRef_ = System.IntPtr.Zero; System.IntPtr *commandQueuesOut_; commandQueuesOut_ = (System.IntPtr *) 0; if (commandQueuesOut != null) { System.IntPtr *_commandQueuesOut = stackalloc System.IntPtr[commandQueuesOut.Length]; commandQueuesOut_ = _commandQueuesOut; } System.IntPtr deviceOut_ = System.IntPtr.Zero; System.IntPtr immediateContextOut_ = System.IntPtr.Zero; SharpDX.Result __result__; deviceRef_ = SharpDX.CppObject.ToCallbackPtr <SharpDX.IUnknown>(deviceRef); if (commandQueuesOut != null) { for (int i = 0; i < commandQueuesOut.Length; ++i) { (commandQueuesOut_)[i] = SharpDX.CppObject.ToCallbackPtr <SharpDX.IUnknown>(commandQueuesOut[i]); } fixed(void *chosenFeatureLevelRef_ = &chosenFeatureLevelRef) fixed(void *featureLevelsRef_ = featureLevelsRef) __result__ = D3D11On12CreateDevice_((void *)deviceRef_, unchecked ((System.Int32)flags), featureLevelsRef_, featureLevels, (void *)commandQueuesOut_, numQueues, nodeMask, &deviceOut_, &immediateContextOut_, chosenFeatureLevelRef_); if (deviceOut_ != System.IntPtr.Zero) { deviceOut = new SharpDX.Direct3D11.Device(deviceOut_); } else { deviceOut = null; } if (immediateContextOut_ != System.IntPtr.Zero) immediateContextOut = new SharpDX.Direct3D11.DeviceContext(immediateContextOut_); } else { immediateContextOut = null; } __result__.CheckError(); }