Class D3D11Device
The device interface represents a virtual adapter; it is used to create resources.
Inherited Members
Namespace: JeremyAnsel.DirectX.D3D11
Assembly: JeremyAnsel.DirectX.D3D11.dll
Syntax
public sealed class D3D11Device : IDisposable, ID3D11Releasable
Properties
| Edit this page View SourceCreationOptions
Gets the options used during the call to create the device.
Declaration
public D3D11CreateDeviceOptions CreationOptions { get; }
Property Value
Type | Description |
---|---|
D3D11CreateDeviceOptions |
FeatureLevel
Gets the feature level of the hardware device.
Declaration
public D3D11FeatureLevel FeatureLevel { get; }
Property Value
Type | Description |
---|---|
D3D11FeatureLevel |
Handle
Gets an handle representing the D3D11 object interface.
Declaration
public object Handle { get; }
Property Value
Type | Description |
---|---|
object |
Methods
| Edit this page View SourceCheckCounter(D3D11CounterDesc, out D3D11CounterDataType, out uint)
Get the type, name, units of measure, and a description of an existing counter.
Declaration
public bool CheckCounter(D3D11CounterDesc desc, out D3D11CounterDataType type, out uint activeCounters)
Parameters
Type | Name | Description |
---|---|---|
D3D11CounterDesc | desc | A counter description. |
D3D11CounterDataType | type | The data type of a counter. |
uint | activeCounters | The number of hardware counters that are needed for this counter type to be created. All instances of the same counter type use the same hardware counters. |
Returns
Type | Description |
---|---|
bool | A boolean value. |
CheckCounter(D3D11CounterDesc, out D3D11CounterDataType, out uint, out string, out string, out string)
Get the type, name, units of measure, and a description of an existing counter.
Declaration
public bool CheckCounter(D3D11CounterDesc desc, out D3D11CounterDataType type, out uint activeCounters, out string name, out string units, out string description)
Parameters
Type | Name | Description |
---|---|---|
D3D11CounterDesc | desc | A counter description. |
D3D11CounterDataType | type | The data type of a counter. |
uint | activeCounters | The number of hardware counters that are needed for this counter type to be created. All instances of the same counter type use the same hardware counters. |
string | name | String to be filled with a brief name for the counter. |
string | units | Name of the units a counter measures. |
string | description | A description of the counter. |
Returns
Type | Description |
---|---|
bool | A boolean value. |
CheckCounterInfo()
Get a counter's information.
Declaration
public D3D11CounterInfo CheckCounterInfo()
Returns
Type | Description |
---|---|
D3D11CounterInfo | A counter information. |
CheckFeatureSupport(D3D11Feature)
Gets information about the features that are supported by the current graphics driver.
Declaration
public object CheckFeatureSupport(D3D11Feature feature)
Parameters
Type | Name | Description |
---|---|---|
D3D11Feature | feature | Describes which feature to query for support. |
Returns
Type | Description |
---|---|
object | A structure filled with data that describes the feature support. |
CheckFeatureSupportArchitectureInfo()
Gets information about the features that are supported by the current graphics driver.
Declaration
public D3D11FeatureDataArchitectureInfo CheckFeatureSupportArchitectureInfo()
Returns
Type | Description |
---|---|
D3D11FeatureDataArchitectureInfo | A structure filled with data that describes the feature support. |
CheckFeatureSupportD3D10XHardwareOptions()
Gets information about the features that are supported by the current graphics driver.
Declaration
public D3D11FeatureDataD3D10XHardwareOptions CheckFeatureSupportD3D10XHardwareOptions()
Returns
Type | Description |
---|---|
D3D11FeatureDataD3D10XHardwareOptions | A structure filled with data that describes the feature support. |
CheckFeatureSupportD3D11Options()
Gets information about the features that are supported by the current graphics driver.
Declaration
public D3D11FeatureDataD3D11Options CheckFeatureSupportD3D11Options()
Returns
Type | Description |
---|---|
D3D11FeatureDataD3D11Options | A structure filled with data that describes the feature support. |
CheckFeatureSupportD3D11Options1()
Gets information about the features that are supported by the current graphics driver.
Declaration
public D3D11FeatureDataD3D11Options1 CheckFeatureSupportD3D11Options1()
Returns
Type | Description |
---|---|
D3D11FeatureDataD3D11Options1 | A structure filled with data that describes the feature support. |
CheckFeatureSupportD3D9Options()
Gets information about the features that are supported by the current graphics driver.
Declaration
public D3D11FeatureDataD3D9Options CheckFeatureSupportD3D9Options()
Returns
Type | Description |
---|---|
D3D11FeatureDataD3D9Options | A structure filled with data that describes the feature support. |
CheckFeatureSupportD3D9Options1()
Gets information about the features that are supported by the current graphics driver.
Declaration
public D3D11FeatureDataD3D9Options1 CheckFeatureSupportD3D9Options1()
Returns
Type | Description |
---|---|
D3D11FeatureDataD3D9Options1 | A structure filled with data that describes the feature support. |
CheckFeatureSupportD3D9ShadowSupport()
Gets information about the features that are supported by the current graphics driver.
Declaration
public D3D11FeatureDataD3D9ShadowSupport CheckFeatureSupportD3D9ShadowSupport()
Returns
Type | Description |
---|---|
D3D11FeatureDataD3D9ShadowSupport | A structure filled with data that describes the feature support. |
CheckFeatureSupportD3D9SimpleInstancingSupport()
Gets information about the features that are supported by the current graphics driver.
Declaration
public D3D11FeatureDataD3D9SimpleInstancingSupport CheckFeatureSupportD3D9SimpleInstancingSupport()
Returns
Type | Description |
---|---|
D3D11FeatureDataD3D9SimpleInstancingSupport | A structure filled with data that describes the feature support. |
CheckFeatureSupportDoubles()
Gets information about the features that are supported by the current graphics driver.
Declaration
public D3D11FeatureDataDoubles CheckFeatureSupportDoubles()
Returns
Type | Description |
---|---|
D3D11FeatureDataDoubles | A structure filled with data that describes the feature support. |
CheckFeatureSupportFormatSupport()
Gets information about the features that are supported by the current graphics driver.
Declaration
public D3D11FeatureDataFormatSupport CheckFeatureSupportFormatSupport()
Returns
Type | Description |
---|---|
D3D11FeatureDataFormatSupport | A structure filled with data that describes the feature support. |
CheckFeatureSupportFormatSupport2()
Gets information about the features that are supported by the current graphics driver.
Declaration
public D3D11FeatureDataFormatSupport2 CheckFeatureSupportFormatSupport2()
Returns
Type | Description |
---|---|
D3D11FeatureDataFormatSupport2 | A structure filled with data that describes the feature support. |
CheckFeatureSupportMarkerSupport()
Gets information about the features that are supported by the current graphics driver.
Declaration
public D3D11FeatureDataMarkerSupport CheckFeatureSupportMarkerSupport()
Returns
Type | Description |
---|---|
D3D11FeatureDataMarkerSupport | A structure filled with data that describes the feature support. |
CheckFeatureSupportShaderMinPrecisionSupport()
Gets information about the features that are supported by the current graphics driver.
Declaration
public D3D11FeatureDataShaderMinPrecisionSupport CheckFeatureSupportShaderMinPrecisionSupport()
Returns
Type | Description |
---|---|
D3D11FeatureDataShaderMinPrecisionSupport | A structure filled with data that describes the feature support. |
CheckFeatureSupportThreading()
Gets information about the features that are supported by the current graphics driver.
Declaration
public D3D11FeatureDataThreading CheckFeatureSupportThreading()
Returns
Type | Description |
---|---|
D3D11FeatureDataThreading | A structure filled with data that describes the feature support. |
CheckFormatSupport(DxgiFormat, out D3D11FormatSupport)
Get the support of a given format on the installed video device.
Declaration
public bool CheckFormatSupport(DxgiFormat format, out D3D11FormatSupport formatSupport)
Parameters
Type | Name | Description |
---|---|---|
DxgiFormat | format | A format for which to check for support. |
D3D11FormatSupport | formatSupport | Describes how the specified format is supported on the installed device. |
Returns
Type | Description |
---|---|
bool | A boolean value. |
CheckMultisampleQualityLevels(DxgiFormat, uint, out uint)
Get the number of quality levels available during multisampling.
Declaration
public bool CheckMultisampleQualityLevels(DxgiFormat format, uint sampleCount, out uint numQualityLevels)
Parameters
Type | Name | Description |
---|---|---|
DxgiFormat | format | The texture format. |
uint | sampleCount | The number of samples during multisampling. |
uint | numQualityLevels | The number of quality levels supported by the adapter. |
Returns
Type | Description |
---|---|
bool | A boolean value. |
CreateBlendState(D3D11BlendDesc)
Create a blend-state object that encapsules blend state for the output-merger stage.
Declaration
public D3D11BlendState CreateBlendState(D3D11BlendDesc desc)
Parameters
Type | Name | Description |
---|---|---|
D3D11BlendDesc | desc | A blend-state description. |
Returns
Type | Description |
---|---|
D3D11BlendState | The created blend-state object. |
CreateBuffer(D3D11BufferDesc)
Creates a buffer (vertex buffer, index buffer, or shader constant buffer).
Declaration
public D3D11Buffer CreateBuffer(D3D11BufferDesc desc)
Parameters
Type | Name | Description |
---|---|---|
D3D11BufferDesc | desc | Describes the buffer. |
Returns
Type | Description |
---|---|
D3D11Buffer | The buffer object created. |
CreateBuffer(D3D11BufferDesc, D3D11SubResourceData)
Creates a buffer (vertex buffer, index buffer, or shader constant buffer).
Declaration
public D3D11Buffer CreateBuffer(D3D11BufferDesc desc, D3D11SubResourceData data)
Parameters
Type | Name | Description |
---|---|---|
D3D11BufferDesc | desc | Describes the buffer. |
D3D11SubResourceData | data | Describes the initialization data. |
Returns
Type | Description |
---|---|
D3D11Buffer | The buffer object created. |
CreateBuffer<T>(D3D11BufferDesc, T, uint, uint)
Creates a buffer (vertex buffer, index buffer, or shader constant buffer).
Declaration
public D3D11Buffer CreateBuffer<T>(D3D11BufferDesc desc, T data, uint sysMemPitch, uint sysMemSlicePitch) where T : struct
Parameters
Type | Name | Description |
---|---|---|
D3D11BufferDesc | desc | Describes the buffer. |
T | data | Describes the initialization data. |
uint | sysMemPitch | The distance (in bytes) from the beginning of one line of a texture to the next line. |
uint | sysMemSlicePitch | The distance (in bytes) from the beginning of one depth level to the next. |
Returns
Type | Description |
---|---|
D3D11Buffer | The buffer object created. |
Type Parameters
Name | Description |
---|---|
T | A struct. |
CreateBuffer<T>(D3D11BufferDesc, T[], uint, uint)
Creates a buffer (vertex buffer, index buffer, or shader constant buffer).
Declaration
public D3D11Buffer CreateBuffer<T>(D3D11BufferDesc desc, T[] data, uint sysMemPitch, uint sysMemSlicePitch) where T : struct
Parameters
Type | Name | Description |
---|---|---|
D3D11BufferDesc | desc | Describes the buffer. |
T[] | data | Describes the initialization data. |
uint | sysMemPitch | The distance (in bytes) from the beginning of one line of a texture to the next line. |
uint | sysMemSlicePitch | The distance (in bytes) from the beginning of one depth level to the next. |
Returns
Type | Description |
---|---|
D3D11Buffer | The buffer object created. |
Type Parameters
Name | Description |
---|---|
T | A array of struct. |
CreateClassLinkage()
Creates class linkage libraries to enable dynamic shader linkage.
Declaration
public D3D11ClassLinkage CreateClassLinkage()
Returns
Type | Description |
---|---|
D3D11ClassLinkage | The created class linkage. |
CreateComputeShader(byte[], D3D11ClassLinkage)
Create a compute shader.
Declaration
public D3D11ComputeShader CreateComputeShader(byte[] shaderBytecode, D3D11ClassLinkage classLinkage)
Parameters
Type | Name | Description |
---|---|---|
byte[] | shaderBytecode | The compiled shader. |
D3D11ClassLinkage | classLinkage | A class linkage interface. |
Returns
Type | Description |
---|---|
D3D11ComputeShader | The created compute shader. |
CreateCounter(D3D11CounterDesc)
Create a counter object for measuring GPU performance.
Declaration
public D3D11Counter CreateCounter(D3D11CounterDesc desc)
Parameters
Type | Name | Description |
---|---|---|
D3D11CounterDesc | desc | A counter description. |
Returns
Type | Description |
---|---|
D3D11Counter | The created counter. |
CreateDeferredContext()
Creates a deferred context, which can record command lists.
Declaration
public D3D11DeviceContext CreateDeferredContext()
Returns
Type | Description |
---|---|
D3D11DeviceContext | The created deferred context. |
CreateDepthStencilState(D3D11DepthStencilDesc)
Create a depth-stencil state object that encapsulates depth-stencil test information for the output-merger stage.
Declaration
public D3D11DepthStencilState CreateDepthStencilState(D3D11DepthStencilDesc desc)
Parameters
Type | Name | Description |
---|---|---|
D3D11DepthStencilDesc | desc | A depth-stencil state description. |
Returns
Type | Description |
---|---|
D3D11DepthStencilState | The created depth-stencil state object. |
CreateDepthStencilView(D3D11Resource, D3D11DepthStencilViewDesc?)
Create a depth-stencil view for accessing resource data.
Declaration
public D3D11DepthStencilView CreateDepthStencilView(D3D11Resource resource, D3D11DepthStencilViewDesc? desc)
Parameters
Type | Name | Description |
---|---|---|
D3D11Resource | resource | The resource that will serve as the depth-stencil surface. |
D3D11DepthStencilViewDesc? | desc | A depth-stencil-view description. |
Returns
Type | Description |
---|---|
D3D11DepthStencilView | The created depth-stencil view. |
CreateDevice(object, D3D11DriverType, D3D11CreateDeviceOptions, D3D11FeatureLevel[], out D3D11Device, out D3D11FeatureLevel, out D3D11DeviceContext)
Creates a device that represents the display adapter.
Declaration
public static void CreateDevice(object adapter, D3D11DriverType driverType, D3D11CreateDeviceOptions options, D3D11FeatureLevel[] featureLevels, out D3D11Device device, out D3D11FeatureLevel featureLevel, out D3D11DeviceContext immediateContext)
Parameters
Type | Name | Description |
---|---|---|
object | adapter | A pointer to the video adapter to use when creating a device. |
D3D11DriverType | driverType | The driver type to create. |
D3D11CreateDeviceOptions | options | The runtime layers to enable. |
D3D11FeatureLevel[] | featureLevels | Determine the order of feature levels to attempt to create. |
D3D11Device | device | The created device. |
D3D11FeatureLevel | featureLevel | If successful, returns the first feature level from the |
D3D11DeviceContext | immediateContext | The device context. |
CreateDeviceAndSwapChain(object, D3D11DriverType, D3D11CreateDeviceOptions, D3D11FeatureLevel[], DxgiSwapChainDesc, out object, out D3D11Device, out D3D11FeatureLevel, out D3D11DeviceContext)
Creates a device that represents the display adapter and a swap chain used for rendering.
Declaration
[Obsolete("Use CreateDevice instead.")]
public static void CreateDeviceAndSwapChain(object adapter, D3D11DriverType driverType, D3D11CreateDeviceOptions options, D3D11FeatureLevel[] featureLevels, DxgiSwapChainDesc swapChainDesc, out object swapChain, out D3D11Device device, out D3D11FeatureLevel featureLevel, out D3D11DeviceContext immediateContext)
Parameters
Type | Name | Description |
---|---|---|
object | adapter | The video adapter to use when creating a device. |
D3D11DriverType | driverType | The driver type to create. |
D3D11CreateDeviceOptions | options | The runtime layers to enable. |
D3D11FeatureLevel[] | featureLevels | Determine the order of feature levels to attempt to create. |
DxgiSwapChainDesc | swapChainDesc | A swap chain description that contains initialization parameters for the swap chain. |
object | swapChain | The swap chain used for rendering. |
D3D11Device | device | The created device. |
D3D11FeatureLevel | featureLevel | If successful, returns the first feature level from the |
D3D11DeviceContext | immediateContext | The device context. |
CreateDomainShader(byte[], D3D11ClassLinkage)
Create a domain shader.
Declaration
public D3D11DomainShader CreateDomainShader(byte[] shaderBytecode, D3D11ClassLinkage classLinkage)
Parameters
Type | Name | Description |
---|---|---|
byte[] | shaderBytecode | The compiled shader. |
D3D11ClassLinkage | classLinkage | A class linkage interface. |
Returns
Type | Description |
---|---|
D3D11DomainShader | The created domain shader. |
CreateGeometryShader(byte[], D3D11ClassLinkage)
Create a geometry shader.
Declaration
public D3D11GeometryShader CreateGeometryShader(byte[] shaderBytecode, D3D11ClassLinkage classLinkage)
Parameters
Type | Name | Description |
---|---|---|
byte[] | shaderBytecode | The compiled shader. |
D3D11ClassLinkage | classLinkage | A class linkage interface. |
Returns
Type | Description |
---|---|
D3D11GeometryShader | The created geometry shader. |
CreateGeometryShaderWithStreamOutput(byte[], D3D11StreamOutputDeclarationEntry[], uint[], uint, D3D11ClassLinkage)
Creates a geometry shader that can write to streaming output buffers.
Declaration
public D3D11GeometryShader CreateGeometryShaderWithStreamOutput(byte[] shaderBytecode, D3D11StreamOutputDeclarationEntry[] streamOutputDeclaration, uint[] bufferStrides, uint rasterizedStream, D3D11ClassLinkage classLinkage)
Parameters
Type | Name | Description |
---|---|---|
byte[] | shaderBytecode | The compiled geometry shader for a standard geometry shader plus stream output. |
D3D11StreamOutputDeclarationEntry[] | streamOutputDeclaration | A D3D11StreamOutputDeclarationEntry array. |
uint[] | bufferStrides | An array of buffer strides; each stride is the size of an element for that buffer. |
uint | rasterizedStream | The index number of the stream to be sent to the rasterizer stage. |
D3D11ClassLinkage | classLinkage | A class linkage interface. |
Returns
Type | Description |
---|---|
D3D11GeometryShader | The created geometry shader. |
CreateHullShader(byte[], D3D11ClassLinkage)
Create a hull shader.
Declaration
public D3D11HullShader CreateHullShader(byte[] shaderBytecode, D3D11ClassLinkage classLinkage)
Parameters
Type | Name | Description |
---|---|---|
byte[] | shaderBytecode | The compiled shader. |
D3D11ClassLinkage | classLinkage | A class linkage interface. |
Returns
Type | Description |
---|---|
D3D11HullShader | The created hull shader. |
CreateInputLayout(D3D11InputElementDesc[], byte[])
Create an input-layout object to describe the input-buffer data for the input-assembler stage.
Declaration
public D3D11InputLayout CreateInputLayout(D3D11InputElementDesc[] elementDescs, byte[] shaderBytecodeWithInputSignature)
Parameters
Type | Name | Description |
---|---|---|
D3D11InputElementDesc[] | elementDescs | An array of the input-assembler stage input data types; each type is described by an element description. |
byte[] | shaderBytecodeWithInputSignature | The compiled shader. The compiled shader code contains a input signature which is validated against the array of elements. |
Returns
Type | Description |
---|---|
D3D11InputLayout | The created input-layout object. |
CreatePixelShader(byte[], D3D11ClassLinkage)
Create a pixel shader.
Declaration
public D3D11PixelShader CreatePixelShader(byte[] shaderBytecode, D3D11ClassLinkage classLinkage)
Parameters
Type | Name | Description |
---|---|---|
byte[] | shaderBytecode | The compiled shader. |
D3D11ClassLinkage | classLinkage | A class linkage interface. |
Returns
Type | Description |
---|---|
D3D11PixelShader | The created pixel shader. |
CreatePredicate(D3D11QueryDesc)
Creates a predicate.
Declaration
public D3D11Predicate CreatePredicate(D3D11QueryDesc desc)
Parameters
Type | Name | Description |
---|---|---|
D3D11QueryDesc | desc | A query description for a predicate. |
Returns
Type | Description |
---|---|
D3D11Predicate | The created predicate. |
CreateQuery(D3D11QueryDesc)
Creates an object for querying information from the GPU.
Declaration
public D3D11Query CreateQuery(D3D11QueryDesc desc)
Parameters
Type | Name | Description |
---|---|---|
D3D11QueryDesc | desc | A query description. |
Returns
Type | Description |
---|---|
D3D11Query | The created query. |
CreateRasterizerState(D3D11RasterizerDesc)
Create a rasterizer state object that tells the rasterizer stage how to behave.
Declaration
public D3D11RasterizerState CreateRasterizerState(D3D11RasterizerDesc desc)
Parameters
Type | Name | Description |
---|---|---|
D3D11RasterizerDesc | desc | A rasterizer state description. |
Returns
Type | Description |
---|---|
D3D11RasterizerState | The created rasterizer state object. |
CreateRenderTargetView(D3D11Resource, D3D11RenderTargetViewDesc?)
Creates a render-target view for accessing resource data.
Declaration
public D3D11RenderTargetView CreateRenderTargetView(D3D11Resource resource, D3D11RenderTargetViewDesc? desc)
Parameters
Type | Name | Description |
---|---|---|
D3D11Resource | resource | A render target resource. |
D3D11RenderTargetViewDesc? | desc | A render-target view description. |
Returns
Type | Description |
---|---|
D3D11RenderTargetView | The created render target view. |
CreateSamplerState(D3D11SamplerDesc)
Create a sampler-state object that encapsulates sampling information for a texture.
Declaration
public D3D11SamplerState CreateSamplerState(D3D11SamplerDesc desc)
Parameters
Type | Name | Description |
---|---|---|
D3D11SamplerDesc | desc | A sampler state description. |
Returns
Type | Description |
---|---|
D3D11SamplerState | The created sampler-state object. |
CreateShaderResourceView(D3D11Resource, D3D11ShaderResourceViewDesc?)
Create a shader resource view for accessing data in a resource.
Declaration
public D3D11ShaderResourceView CreateShaderResourceView(D3D11Resource resource, D3D11ShaderResourceViewDesc? desc)
Parameters
Type | Name | Description |
---|---|---|
D3D11Resource | resource | The resource that will serve as input to a shader. |
D3D11ShaderResourceViewDesc? | desc | A shader resource view description. |
Returns
Type | Description |
---|---|
D3D11ShaderResourceView | The created shader resource view. |
CreateTexture1D(D3D11Texture1DDesc)
Creates an array of 1D textures.
Declaration
public D3D11Texture1D CreateTexture1D(D3D11Texture1DDesc desc)
Parameters
Type | Name | Description |
---|---|---|
D3D11Texture1DDesc | desc | Describes a 1D texture resource. |
Returns
Type | Description |
---|---|
D3D11Texture1D | The created texture. |
CreateTexture1D(D3D11Texture1DDesc, D3D11SubResourceData[])
Creates an array of 1D textures.
Declaration
public D3D11Texture1D CreateTexture1D(D3D11Texture1DDesc desc, D3D11SubResourceData[] data)
Parameters
Type | Name | Description |
---|---|---|
D3D11Texture1DDesc | desc | Describes a 1D texture resource. |
D3D11SubResourceData[] | data | Describe subresources for the 1D texture resource. |
Returns
Type | Description |
---|---|
D3D11Texture1D | The created texture. |
CreateTexture2D(D3D11Texture2DDesc)
Create an array of 2D textures.
Declaration
public D3D11Texture2D CreateTexture2D(D3D11Texture2DDesc desc)
Parameters
Type | Name | Description |
---|---|---|
D3D11Texture2DDesc | desc | Describes a 2D texture resource. |
Returns
Type | Description |
---|---|
D3D11Texture2D | The created texture. |
CreateTexture2D(D3D11Texture2DDesc, D3D11SubResourceData[])
Create an array of 2D textures.
Declaration
public D3D11Texture2D CreateTexture2D(D3D11Texture2DDesc desc, D3D11SubResourceData[] data)
Parameters
Type | Name | Description |
---|---|---|
D3D11Texture2DDesc | desc | Describes a 2D texture resource. |
D3D11SubResourceData[] | data | Describe subresources for the 2D texture resource. |
Returns
Type | Description |
---|---|
D3D11Texture2D | The created texture. |
CreateTexture3D(D3D11Texture3DDesc)
Create a single 3D texture.
Declaration
public D3D11Texture3D CreateTexture3D(D3D11Texture3DDesc desc)
Parameters
Type | Name | Description |
---|---|---|
D3D11Texture3DDesc | desc | Describes a 3D texture resource. |
Returns
Type | Description |
---|---|
D3D11Texture3D | The created texture. |
CreateTexture3D(D3D11Texture3DDesc, D3D11SubResourceData[])
Create a single 3D texture.
Declaration
public D3D11Texture3D CreateTexture3D(D3D11Texture3DDesc desc, D3D11SubResourceData[] data)
Parameters
Type | Name | Description |
---|---|---|
D3D11Texture3DDesc | desc | Describes a 3D texture resource. |
D3D11SubResourceData[] | data | Describe subresources for the 3D texture resource. |
Returns
Type | Description |
---|---|
D3D11Texture3D | The created texture. |
CreateUnorderedAccessView(D3D11Resource, D3D11UnorderedAccessViewDesc?)
Creates a view for accessing an unordered access resource.
Declaration
public D3D11UnorderedAccessView CreateUnorderedAccessView(D3D11Resource resource, D3D11UnorderedAccessViewDesc? desc)
Parameters
Type | Name | Description |
---|---|---|
D3D11Resource | resource | A resources that will serve as an input to a shader. |
D3D11UnorderedAccessViewDesc? | desc | A shader resource view description. |
Returns
Type | Description |
---|---|
D3D11UnorderedAccessView | The created unordered-access view. |
CreateVertexShader(byte[], D3D11ClassLinkage)
Create a vertex shader object from a compiled shader.
Declaration
public D3D11VertexShader CreateVertexShader(byte[] shaderBytecode, D3D11ClassLinkage classLinkage)
Parameters
Type | Name | Description |
---|---|---|
byte[] | shaderBytecode | The compiled shader. |
D3D11ClassLinkage | classLinkage | A class linkage interface. |
Returns
Type | Description |
---|---|
D3D11VertexShader | The created vertex shader. |
Dispose()
Immediately releases the unmanaged resources used by the D3D11Device object.
Declaration
public void Dispose()
GetDebugName()
Gets a unique name to objects in order to assist the developer during debugging.
Declaration
public string GetDebugName()
Returns
Type | Description |
---|---|
string | The friendly name. |
GetDeviceRemovedReason()
Get the reason why the device was removed.
Declaration
public Exception GetDeviceRemovedReason()
Returns
Type | Description |
---|---|
Exception | The removed reason exception. |
GetImmediateContext()
Gets an immediate context, which can play back command lists.
Declaration
public D3D11DeviceContext GetImmediateContext()
Returns
Type | Description |
---|---|
D3D11DeviceContext | An immediate context. |
GetPrivateDataText(Guid)
Gets an application-defined data from the object that is associated with a GUID.
Declaration
public string GetPrivateDataText(Guid name)
Parameters
Type | Name | Description |
---|---|---|
Guid | name | A GUID identifying the data. |
Returns
Type | Description |
---|---|
string | The object's text. |
OpenSharedResource(nint, Guid)
Give a device access to a shared resource created on a different device.
Declaration
public object OpenSharedResource(nint resourceHandle, Guid returnedInterface)
Parameters
Type | Name | Description |
---|---|---|
nint | resourceHandle | A resource handle. |
Guid | returnedInterface | The globally unique identifier (GUID) for the resource interface. |
Returns
Type | Description |
---|---|
object | A pointer to the resource we are gaining access to. |
Release()
Releases the managed reference to the COM D3D11 interface.
Declaration
public void Release()
SetDebugName(string)
Sets a unique name to objects in order to assist the developer during debugging.
Declaration
public void SetDebugName(string name)
Parameters
Type | Name | Description |
---|---|---|
string | name | The friendly name. |
SetPrivateDataText(Guid, string)
Sets an application-defined data to the object and associates that data with a GUID.
Declaration
public void SetPrivateDataText(Guid name, string text)
Parameters
Type | Name | Description |
---|---|---|
Guid | name | A GUID that identifies the data. |
string | text | The object's text. |
ThrowDeviceRemovedReason()
Throw a device removed reason exception.
Declaration
public void ThrowDeviceRemovedReason()
ToBoolean()
Gets a boolean indicating if the handle is not null.
Declaration
public bool ToBoolean()
Returns
Type | Description |
---|---|
bool | A boolean |
Operators
| Edit this page View Sourceimplicit operator bool(D3D11Device)
Gets a boolean indicating if the handle is not null.
Declaration
public static implicit operator bool(D3D11Device value)
Parameters
Type | Name | Description |
---|---|---|
D3D11Device | value | A D3D11 device. |
Returns
Type | Description |
---|---|
bool | A boolean |