[]
ID3D11Device
[Guid("db6f6ddb-ac77-4e88-8253-819df9bbf140")]
public class Device : ComObject, IDisposable, IUnknown
Initializes a new instance of the Device class.
public Device(IntPtr nativePtr)
nativePtr System.IntPtrThe native pointer.
Constant MultisampleCountMaximum.
public const int MultisampleCountMaximum = 32
Gets or sets the debug-name for this object.
public string DebugName { get; set; }
GetImmediateContext
public DeviceContext ImmediateContext { get; }
Check if this device is supporting compute shaders for the specified format.
public ComputeShaderFormatSupport CheckComputeShaderFormatSupport(Format format)
format FormatThe format for which to check support.
Flags indicating usage contexts in which the specified format is supported.
HRESULT ID3D11Device::CheckCounter([In] const D3D11_COUNTER_DESC* pDesc,[Out] D3D11_COUNTER_TYPE* pType,[Out] unsigned int* pActiveCounters,[Out, Buffer, Optional] char* szName,[InOut, Optional] unsigned int* pNameLength,[Out, Buffer, Optional] char* szUnits,[InOut, Optional] unsigned int* pUnitsLength,[Out, Buffer, Optional] char* szDescription,[InOut, Optional] unsigned int* pDescriptionLength)
public void CheckCounter(CounterDescription descRef, out CounterType typeRef, out int activeCountersRef, IntPtr szName, IntPtr nameLengthRef, IntPtr szUnits, IntPtr unitsLengthRef, IntPtr szDescription, IntPtr descriptionLengthRef)
descRef CounterDescriptiontypeRef CounterTypeactiveCountersRef intszName System.IntPtrnameLengthRef System.IntPtrszUnits System.IntPtrunitsLengthRef System.IntPtrszDescription System.IntPtrdescriptionLengthRef System.IntPtrGets information about the features D3D11Options that are supported by the current graphics driver.
public FeatureDataD3D11Options CheckD3D11Feature()
Returns a structure FeatureDataD3D11Options
HRESULT ID3D11Device::CheckFeatureSupport([In] D3D11_FEATURE Feature,[Out, Buffer] void* pFeatureSupportData,[In] unsigned int FeatureSupportDataSize)
public HResult CheckFeatureSupport(Feature feature, IntPtr featureSupportDataRef, int featureSupportDataSize)
feature FeaturefeatureSupportDataRef System.IntPtrfeatureSupportDataSize intCheck if this device is supporting a feature.
public bool CheckFeatureSupport(Feature feature)
feature FeatureThe feature to check.
Returns true if this device supports this feature, otherwise false.
HRESULT ID3D11Device::CheckFormatSupport([In] DXGI_FORMAT Format,[Out] D3D11_FORMAT_SUPPORT* pFormatSupport)
public FormatSupport CheckFormatSupport(Format format)
format FormatGets information about whether the driver supports the nonpowers-of-2-unconditionally feature.
public bool CheckFullNonPow2TextureSupport()
Returns true if this hardware supports non-powers-of-2 texture. This returns always true Direct3D 10 and higher feature levels.
HRESULT ID3D11Device::CheckMultisampleQualityLevels([In] DXGI_FORMAT Format,[In] unsigned int SampleCount,[Out] unsigned int* pNumQualityLevels)
public int CheckMultisampleQualityLevels(Format format, int sampleCount)
format FormatsampleCount intGets information about the features ShaderMinimumPrecisionSupport that are supported by the current graphics driver.
public FeatureDataShaderMinimumPrecisionSupport CheckShaderMinimumPrecisionSupport()
Returns a structure FeatureDataShaderMinimumPrecisionSupport
Check if this device is supporting threading.
public HResult CheckThreadingSupport(out bool supportsConcurrentResources, out bool supportsCommandLists)
supportsConcurrentResources boolSupport concurrent resources.
supportsCommandLists boolSupport command lists.
Gets information about whether a rendering device batches rendering commands and performs multipass rendering into tiles or bins over a render area.
public bool CheckTileBasedDeferredRendererSupport()
Constructor for a D3D11 Device. See CreateDevice(Adapter, DriverType, IntPtr, DeviceCreationFlags, FeatureLevel[], int, int, Device, out FeatureLevel, out DeviceContext) for more information.
public static Device Create(DriverType driverType, DeviceCreationFlags flags, params FeatureLevel[] featureLevels)
driverType DriverTypeflags DeviceCreationFlagsfeatureLevels FeatureLevel[]Constructor for a D3D11 Device. See CreateDevice(Adapter, DriverType, IntPtr, DeviceCreationFlags, FeatureLevel[], int, int, Device, out FeatureLevel, out DeviceContext) for more information.
public static Device Create(DriverType driverType, DeviceCreationFlags flags)
driverType DriverTypeType of the driver.
flags DeviceCreationFlagsThe flags.
Initializes a new instance of the Device class.
public static Device Create(DriverType driverType)
driverType DriverTypeType of the driver.
Constructor for a D3D11 Device. See CreateDevice(Adapter, DriverType, IntPtr, DeviceCreationFlags, FeatureLevel[], int, int, Device, out FeatureLevel, out DeviceContext) for more information.
public static Device Create(Adapter adapter, DeviceCreationFlags flags, params FeatureLevel[] featureLevels)
adapter Adapterflags DeviceCreationFlagsfeatureLevels FeatureLevel[]Constructor for a D3D11 Device. See CreateDevice(Adapter, DriverType, IntPtr, DeviceCreationFlags, FeatureLevel[], int, int, Device, out FeatureLevel, out DeviceContext) for more information.
public static Device Create(Adapter adapter, DeviceCreationFlags flags)
adapter Adapterflags DeviceCreationFlagsInitializes a new instance of the Device class.
public static Device Create(Adapter adapter)
adapter AdapterThe adapter.
HRESULT ID3D11Device::CreateBlendState([In] const D3D11_BLEND_DESC* pBlendStateDesc,[Out, Fast] ID3D11BlendState** ppBlendState)
public BlendState CreateBlendState(ref BlendStateDescription blendStateDescRef)
blendStateDescRef BlendStateDescriptionHRESULT ID3D11Device::CreateBuffer([In] const D3D11_BUFFER_DESC* pDesc,[In, Optional] const D3D11_SUBRESOURCE_DATA* pInitialData,[Out, Fast] ID3D11Buffer** ppBuffer)
public Buffer CreateBuffer(ref BufferDescription descRef, DataBox? initialDataRef)
descRef BufferDescriptioninitialDataRef DataBox?HRESULT ID3D11Device::CreateClassLinkage([Out, Fast] ID3D11ClassLinkage** ppLinkage)
public ClassLinkage CreateClassLinkage()
HRESULT ID3D11Device::CreateComputeShader([In, Buffer] const void* pShaderBytecode,[In] SIZE_T BytecodeLength,[In, Optional] ID3D11ClassLinkage* pClassLinkage,[Out, Fast] ID3D11ComputeShader** ppComputeShader)
public ComputeShader CreateComputeShader(IntPtr shaderBytecodeRef, PointerSize bytecodeLength, ClassLinkage classLinkageRef)
shaderBytecodeRef System.IntPtrbytecodeLength PointerSizeclassLinkageRef ClassLinkageHRESULT ID3D11Device::CreateCounter([In] const D3D11_COUNTER_DESC* pCounterDesc,[Out, Fast] ID3D11Counter** ppCounter)
public Counter CreateCounter(CounterDescription counterDescRef)
counterDescRef CounterDescriptionHRESULT ID3D11Device::CreateDeferredContext([In] unsigned int ContextFlags,[Out, Fast] ID3D11DeviceContext** ppDeferredContext)
public DeviceContext CreateDeferredContext(int contextFlags)
contextFlags intHRESULT ID3D11Device::CreateDepthStencilState([In] const D3D11_DEPTH_STENCIL_DESC* pDepthStencilDesc,[Out, Fast] ID3D11DepthStencilState** ppDepthStencilState)
public DepthStencilState CreateDepthStencilState(ref DepthStencilStateDescription depthStencilDescRef)
depthStencilDescRef DepthStencilStateDescriptionHRESULT ID3D11Device::CreateDepthStencilView([In] ID3D11Resource* pResource,[In, Optional] const D3D11_DEPTH_STENCIL_VIEW_DESC* pDesc,[Out, Fast] ID3D11DepthStencilView** ppDepthStencilView)
public DepthStencilView CreateDepthStencilView(Resource resourceRef, DepthStencilViewDescription? descRef)
resourceRef ResourcedescRef DepthStencilViewDescription?HRESULT ID3D11Device::CreateDomainShader([In, Buffer] const void* pShaderBytecode,[In] SIZE_T BytecodeLength,[In, Optional] ID3D11ClassLinkage* pClassLinkage,[Out, Fast] ID3D11DomainShader** ppDomainShader)
public DomainShader CreateDomainShader(IntPtr shaderBytecodeRef, PointerSize bytecodeLength, ClassLinkage classLinkageRef)
shaderBytecodeRef System.IntPtrbytecodeLength PointerSizeclassLinkageRef ClassLinkageHRESULT ID3D11Device::CreateGeometryShader([In, Buffer] const void* pShaderBytecode,[In] SIZE_T BytecodeLength,[In, Optional] ID3D11ClassLinkage* pClassLinkage,[Out, Fast] ID3D11GeometryShader** ppGeometryShader)
public GeometryShader CreateGeometryShader(IntPtr shaderBytecodeRef, PointerSize bytecodeLength, ClassLinkage classLinkageRef)
shaderBytecodeRef System.IntPtrbytecodeLength PointerSizeclassLinkageRef ClassLinkageHRESULT ID3D11Device::CreateGeometryShaderWithStreamOutput([In, Buffer] const void* pShaderBytecode,[In] SIZE_T BytecodeLength,[In, Buffer, Optional] const D3D11_SO_DECLARATION_ENTRY* pSODeclaration,[In] unsigned int NumEntries,[In, Buffer, Optional] const unsigned int* pBufferStrides,[In] unsigned int NumStrides,[In] unsigned int RasterizedStream,[In, Optional] ID3D11ClassLinkage* pClassLinkage,[Out, Fast] ID3D11GeometryShader** ppGeometryShader)
public GeometryShader CreateGeometryShaderWithStreamOutput(IntPtr shaderBytecodeRef, PointerSize bytecodeLength, StreamOutputElement[] sODeclarationRef, int numEntries, int[] bufferStridesRef, int numStrides, int rasterizedStream, ClassLinkage classLinkageRef)
shaderBytecodeRef System.IntPtrbytecodeLength PointerSizesODeclarationRef StreamOutputElement[]numEntries intbufferStridesRef int[]numStrides intrasterizedStream intclassLinkageRef ClassLinkageHRESULT ID3D11Device::CreateHullShader([In, Buffer] const void* pShaderBytecode,[In] SIZE_T BytecodeLength,[In, Optional] ID3D11ClassLinkage* pClassLinkage,[Out, Fast] ID3D11HullShader** ppHullShader)
public HullShader CreateHullShader(IntPtr shaderBytecodeRef, PointerSize bytecodeLength, ClassLinkage classLinkageRef)
shaderBytecodeRef System.IntPtrbytecodeLength PointerSizeclassLinkageRef ClassLinkageHRESULT ID3D11Device::CreateInputLayout([In, Buffer] const D3D11_INPUT_ELEMENT_DESC* pInputElementDescs,[In] unsigned int NumElements,[In, Buffer] const void* pShaderBytecodeWithInputSignature,[In] SIZE_T BytecodeLength,[Out, Fast] ID3D11InputLayout** ppInputLayout)
public InputLayout CreateInputLayout(InputElement[] inputElementDescsRef, int numElements, IntPtr shaderBytecodeWithInputSignatureRef, PointerSize bytecodeLength)
inputElementDescsRef InputElement[]numElements intshaderBytecodeWithInputSignatureRef System.IntPtrbytecodeLength PointerSizeHRESULT ID3D11Device::CreatePixelShader([In, Buffer] const void* pShaderBytecode,[In] SIZE_T BytecodeLength,[In, Optional] ID3D11ClassLinkage* pClassLinkage,[Out, Fast] ID3D11PixelShader** ppPixelShader)
public PixelShader CreatePixelShader(IntPtr shaderBytecodeRef, PointerSize bytecodeLength, ClassLinkage classLinkageRef)
shaderBytecodeRef System.IntPtrbytecodeLength PointerSizeclassLinkageRef ClassLinkageHRESULT ID3D11Device::CreatePredicate([In] const D3D11_QUERY_DESC* pPredicateDesc,[Out, Fast] ID3D11Predicate** ppPredicate)
public Predicate CreatePredicate(QueryDescription predicateDescRef)
predicateDescRef QueryDescriptionHRESULT ID3D11Device::CreateQuery([In] const D3D11_QUERY_DESC* pQueryDesc,[Out, Fast] ID3D11Query** ppQuery)
public Query CreateQuery(QueryDescription queryDescRef)
queryDescRef QueryDescriptionHRESULT ID3D11Device::CreateRasterizerState([In] const D3D11_RASTERIZER_DESC* pRasterizerDesc,[Out, Fast] ID3D11RasterizerState** ppRasterizerState)
public RasterizerState CreateRasterizerState(ref RasterizerStateDescription rasterizerDescRef)
rasterizerDescRef RasterizerStateDescriptionHRESULT ID3D11Device::CreateRenderTargetView([In] ID3D11Resource* pResource,[In, Optional] const D3D11_RENDER_TARGET_VIEW_DESC* pDesc,[Out, Fast] ID3D11RenderTargetView** ppRTView)
public RenderTargetView CreateRenderTargetView(Resource resourceRef, RenderTargetViewDescription? descRef)
resourceRef ResourcedescRef RenderTargetViewDescription?HRESULT ID3D11Device::CreateSamplerState([In] const D3D11_SAMPLER_DESC* pSamplerDesc,[Out, Fast] ID3D11SamplerState** ppSamplerState)
public SamplerState CreateSamplerState(ref SamplerStateDescription samplerDescRef)
samplerDescRef SamplerStateDescriptionHRESULT ID3D11Device::CreateShaderResourceView([In] ID3D11Resource* pResource,[In, Optional] const D3D11_SHADER_RESOURCE_VIEW_DESC* pDesc,[Out, Fast] ID3D11ShaderResourceView** ppSRView)
public ShaderResourceView CreateShaderResourceView(Resource resourceRef, ShaderResourceViewDescription? descRef)
resourceRef ResourcedescRef ShaderResourceViewDescription?HRESULT ID3D11Device::CreateTexture1D([In] const D3D11_TEXTURE1D_DESC* pDesc,[In, Buffer, Optional] const D3D11_SUBRESOURCE_DATA* pInitialData,[Out, Fast] ID3D11Texture1D** ppTexture1D)
public Texture1D CreateTexture1D(ref Texture1DDescription descRef, DataBox[] initialDataRef)
descRef Texture1DDescriptioninitialDataRef DataBox[]HRESULT ID3D11Device::CreateTexture2D([In] const D3D11_TEXTURE2D_DESC* pDesc,[In, Buffer, Optional] const D3D11_SUBRESOURCE_DATA* pInitialData,[Out, Fast] ID3D11Texture2D** ppTexture2D)
public Texture2D CreateTexture2D(ref Texture2DDescription descRef, DataBox[] initialDataRef)
descRef Texture2DDescriptioninitialDataRef DataBox[]HRESULT ID3D11Device::CreateTexture3D([In] const D3D11_TEXTURE3D_DESC* pDesc,[In, Buffer, Optional] const D3D11_SUBRESOURCE_DATA* pInitialData,[Out, Fast] ID3D11Texture3D** ppTexture3D)
public Texture3D CreateTexture3D(ref Texture3DDescription descRef, DataBox[] initialDataRef)
descRef Texture3DDescriptioninitialDataRef DataBox[]HRESULT ID3D11Device::CreateUnorderedAccessView([In] ID3D11Resource* pResource,[In, Optional] const D3D11_UNORDERED_ACCESS_VIEW_DESC* pDesc,[Out, Fast] ID3D11UnorderedAccessView** ppUAView)
public UnorderedAccessView CreateUnorderedAccessView(Resource resourceRef, UnorderedAccessViewDescription? descRef)
resourceRef ResourcedescRef UnorderedAccessViewDescription?HRESULT ID3D11Device::CreateVertexShader([In, Buffer] const void* pShaderBytecode,[In] SIZE_T BytecodeLength,[In, Optional] ID3D11ClassLinkage* pClassLinkage,[Out, Fast] ID3D11VertexShader** ppVertexShader)
public VertexShader CreateVertexShader(IntPtr shaderBytecodeRef, PointerSize bytecodeLength, ClassLinkage classLinkageRef)
shaderBytecodeRef System.IntPtrbytecodeLength PointerSizeclassLinkageRef ClassLinkageClean up any resources being used.
protected override void Dispose(bool disposing)
disposing boolvoid ID3D11Device::CheckCounterInfo([Out] D3D11_COUNTER_INFO* pCounterInfo)
public CounterCapabilities GetCounterCapabilities()
Get the type, name, units of measure, and a description of an existing counter.
public CounterMetadata GetCounterMetadata(CounterDescription counterDescription)
counterDescription CounterDescriptionThe counter description.
Description of the counter
unsigned int ID3D11Device::GetCreationFlags()
public DeviceCreationFlags GetCreationFlags()
HRESULT ID3D11Device::GetDeviceRemovedReason()
public HResult GetDeviceRemovedReason()
unsigned int ID3D11Device::GetExceptionMode()
public int GetExceptionMode()
D3D_FEATURE_LEVEL ID3D11Device::GetFeatureLevel()
public FeatureLevel GetFeatureLevel()
void ID3D11Device::GetImmediateContext([Out] ID3D11DeviceContext** ppImmediateContext)
public void GetImmediateContext(out DeviceContext immediateContextOut)
immediateContextOut DeviceContextHRESULT ID3D11Device::GetPrivateData([In] const GUID& guid,[InOut] unsigned int* pDataSize,[Out, Buffer, Optional] void* pData)
public HResult GetPrivateData(Guid guid, ref int dataSizeRef, IntPtr dataRef)
guid System.GuiddataSizeRef intdataRef System.IntPtrGets the highest supported hardware feature level of the primary adapter.
public static FeatureLevel GetSupportedFeatureLevel()
The highest supported hardware feature level.
Gets the highest supported hardware feature level of the primary adapter.
public static FeatureLevel GetSupportedFeatureLevel(Adapter adapter)
adapter AdapterThe adapter.
The highest supported hardware feature level.
Check if a feature level is supported by a primary adapter.
public static bool IsSupportedFeatureLevel(FeatureLevel featureLevel)
featureLevel FeatureLevelThe feature level.
true if the primary adapter is supporting this feature level; otherwise, false.
Check if a feature level is supported by a particular adapter.
public static bool IsSupportedFeatureLevel(Adapter adapter, FeatureLevel featureLevel)
adapter AdapterThe adapter.
featureLevel FeatureLevelThe feature level.
true if the specified adapter is supporting this feature level; otherwise, false.
HRESULT ID3D11Device::OpenSharedResource([In] void* hResource,[In] const GUID& ReturnedInterface,[Out, Optional] void** ppResource)
public IntPtr OpenSharedResource(IntPtr hResource, Guid returnedInterface)
hResource System.IntPtrreturnedInterface System.GuidGive a device access to a shared resource created on a different Direct3d device.
public T OpenSharedResource<T>(IntPtr resourceHandle) where T : ComObject
resourceHandle System.IntPtrA resource handle. See remarks.
This method returns a reference to the resource we are gaining access to.
TThe type of the resource we are gaining access to.
HRESULT ID3D11Device::SetExceptionMode([In] unsigned int RaiseFlags)
public void SetExceptionMode(int raiseFlags)
raiseFlags intHRESULT ID3D11Device::SetPrivateData([In] const GUID& guid,[In] unsigned int DataSize,[In, Buffer, Optional] const void* pData)
public void SetPrivateData(Guid guid, int dataSize, IntPtr dataRef)
guid System.GuiddataSize intdataRef System.IntPtrHRESULT ID3D11Device::SetPrivateDataInterface([In] const GUID& guid,[In, Optional] const IUnknown* pData)
public void SetPrivateDataInterface(Guid guid, ComObject dataRef)
guid System.GuiddataRef ComObjectPerforms an explicit conversion from System.IntPtr to Device.
public static explicit operator Device(IntPtr nativePointer)
nativePointer System.IntPtr