Class D3D11DeviceAndContext
Implements
Inherited Members
Namespace: JeremyAnsel.DirectX.D3D11
Assembly: JeremyAnsel.DirectX.D3D11.dll
Syntax
public sealed class D3D11DeviceAndContext : IDisposable
Constructors
| Edit this page View SourceD3D11DeviceAndContext(D3D11Device, D3D11DeviceContext, D3D11FeatureLevel)
Declaration
public D3D11DeviceAndContext(D3D11Device device, D3D11DeviceContext context, D3D11FeatureLevel featureLevel)
Parameters
| Type | Name | Description |
|---|---|---|
| D3D11Device | device | |
| D3D11DeviceContext | context | |
| D3D11FeatureLevel | featureLevel |
Properties
| Edit this page View SourceContext
Declaration
public D3D11DeviceContext Context { get; }
Property Value
| Type | Description |
|---|---|
| D3D11DeviceContext |
Device
Declaration
public D3D11Device Device { get; }
Property Value
| Type | Description |
|---|---|
| D3D11Device |
FeatureLevel
Declaration
public D3D11FeatureLevel FeatureLevel { get; }
Property Value
| Type | Description |
|---|---|
| D3D11FeatureLevel |
Methods
| Edit this page View SourceCreate(D3D11DriverType, D3D11CreateDeviceOptions, D3D11FeatureLevel[]?)
Creates a device that represents the display adapter.
Declaration
public static D3D11DeviceAndContext Create(D3D11DriverType driverType, D3D11CreateDeviceOptions options, D3D11FeatureLevel[]? featureLevels)
Parameters
| Type | Name | Description |
|---|---|---|
| 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. |
Returns
| Type | Description |
|---|---|
| D3D11DeviceAndContext | The device, context, and feature level. |
Create(D3D11DriverType, D3D11CreateDeviceOptions, ReadOnlySpan<D3D11FeatureLevel>)
Creates a device that represents the display adapter.
Declaration
public static D3D11DeviceAndContext Create(D3D11DriverType driverType, D3D11CreateDeviceOptions options, ReadOnlySpan<D3D11FeatureLevel> featureLevels)
Parameters
| Type | Name | Description |
|---|---|---|
| D3D11DriverType | driverType | The driver type to create. |
| D3D11CreateDeviceOptions | options | The runtime layers to enable. |
| ReadOnlySpan<D3D11FeatureLevel> | featureLevels | Determine the order of feature levels to attempt to create. |
Returns
| Type | Description |
|---|---|
| D3D11DeviceAndContext | The device, context, and feature level. |
Create(DxgiAdapter, D3D11DriverType, D3D11CreateDeviceOptions, D3D11FeatureLevel[]?)
Creates a device that represents the display adapter.
Declaration
public static D3D11DeviceAndContext Create(DxgiAdapter adapter, D3D11DriverType driverType, D3D11CreateDeviceOptions options, D3D11FeatureLevel[]? featureLevels)
Parameters
| Type | Name | Description |
|---|---|---|
| DxgiAdapter | 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. |
Returns
| Type | Description |
|---|---|
| D3D11DeviceAndContext | The device, context, and feature level. |
Create(DxgiAdapter, D3D11DriverType, D3D11CreateDeviceOptions, ReadOnlySpan<D3D11FeatureLevel>)
Creates a device that represents the display adapter.
Declaration
public static D3D11DeviceAndContext Create(DxgiAdapter adapter, D3D11DriverType driverType, D3D11CreateDeviceOptions options, ReadOnlySpan<D3D11FeatureLevel> featureLevels)
Parameters
| Type | Name | Description |
|---|---|---|
| DxgiAdapter | 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. |
| ReadOnlySpan<D3D11FeatureLevel> | featureLevels | Determine the order of feature levels to attempt to create. |
Returns
| Type | Description |
|---|---|
| D3D11DeviceAndContext | The device, context, and feature level. |
Create(DxgiAdapter1, D3D11DriverType, D3D11CreateDeviceOptions, D3D11FeatureLevel[]?)
Creates a device that represents the display adapter.
Declaration
public static D3D11DeviceAndContext Create(DxgiAdapter1 adapter, D3D11DriverType driverType, D3D11CreateDeviceOptions options, D3D11FeatureLevel[]? featureLevels)
Parameters
| Type | Name | Description |
|---|---|---|
| DxgiAdapter1 | 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. |
Returns
| Type | Description |
|---|---|
| D3D11DeviceAndContext | The device, context, and feature level. |
Create(DxgiAdapter1, D3D11DriverType, D3D11CreateDeviceOptions, ReadOnlySpan<D3D11FeatureLevel>)
Creates a device that represents the display adapter.
Declaration
public static D3D11DeviceAndContext Create(DxgiAdapter1 adapter, D3D11DriverType driverType, D3D11CreateDeviceOptions options, ReadOnlySpan<D3D11FeatureLevel> featureLevels)
Parameters
| Type | Name | Description |
|---|---|---|
| DxgiAdapter1 | 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. |
| ReadOnlySpan<D3D11FeatureLevel> | featureLevels | Determine the order of feature levels to attempt to create. |
Returns
| Type | Description |
|---|---|
| D3D11DeviceAndContext | The device, context, and feature level. |
Create(DxgiAdapter2, D3D11DriverType, D3D11CreateDeviceOptions, D3D11FeatureLevel[]?)
Creates a device that represents the display adapter.
Declaration
public static D3D11DeviceAndContext Create(DxgiAdapter2 adapter, D3D11DriverType driverType, D3D11CreateDeviceOptions options, D3D11FeatureLevel[]? featureLevels)
Parameters
| Type | Name | Description |
|---|---|---|
| DxgiAdapter2 | 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. |
Returns
| Type | Description |
|---|---|
| D3D11DeviceAndContext | The device, context, and feature level. |
Create(DxgiAdapter2, D3D11DriverType, D3D11CreateDeviceOptions, ReadOnlySpan<D3D11FeatureLevel>)
Creates a device that represents the display adapter.
Declaration
public static D3D11DeviceAndContext Create(DxgiAdapter2 adapter, D3D11DriverType driverType, D3D11CreateDeviceOptions options, ReadOnlySpan<D3D11FeatureLevel> featureLevels)
Parameters
| Type | Name | Description |
|---|---|---|
| DxgiAdapter2 | 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. |
| ReadOnlySpan<D3D11FeatureLevel> | featureLevels | Determine the order of feature levels to attempt to create. |
Returns
| Type | Description |
|---|---|
| D3D11DeviceAndContext | The device, context, and feature level. |
Create(DxgiAdapter3, D3D11DriverType, D3D11CreateDeviceOptions, D3D11FeatureLevel[]?)
Creates a device that represents the display adapter.
Declaration
public static D3D11DeviceAndContext Create(DxgiAdapter3 adapter, D3D11DriverType driverType, D3D11CreateDeviceOptions options, D3D11FeatureLevel[]? featureLevels)
Parameters
| Type | Name | Description |
|---|---|---|
| DxgiAdapter3 | 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. |
Returns
| Type | Description |
|---|---|
| D3D11DeviceAndContext | The device, context, and feature level. |
Create(DxgiAdapter3, D3D11DriverType, D3D11CreateDeviceOptions, ReadOnlySpan<D3D11FeatureLevel>)
Creates a device that represents the display adapter.
Declaration
public static D3D11DeviceAndContext Create(DxgiAdapter3 adapter, D3D11DriverType driverType, D3D11CreateDeviceOptions options, ReadOnlySpan<D3D11FeatureLevel> featureLevels)
Parameters
| Type | Name | Description |
|---|---|---|
| DxgiAdapter3 | 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. |
| ReadOnlySpan<D3D11FeatureLevel> | featureLevels | Determine the order of feature levels to attempt to create. |
Returns
| Type | Description |
|---|---|
| D3D11DeviceAndContext | The device, context, and feature level. |
Create(nint, D3D11DriverType, D3D11CreateDeviceOptions, D3D11FeatureLevel[]?)
Creates a device that represents the display adapter.
Declaration
public static D3D11DeviceAndContext Create(nint adapter, D3D11DriverType driverType, D3D11CreateDeviceOptions options, D3D11FeatureLevel[]? featureLevels)
Parameters
| Type | Name | Description |
|---|---|---|
| nint | 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. |
Returns
| Type | Description |
|---|---|
| D3D11DeviceAndContext | The device, context, and feature level. |
Create(nint, D3D11DriverType, D3D11CreateDeviceOptions, ReadOnlySpan<D3D11FeatureLevel>)
Creates a device that represents the display adapter.
Declaration
public static D3D11DeviceAndContext Create(nint adapter, D3D11DriverType driverType, D3D11CreateDeviceOptions options, ReadOnlySpan<D3D11FeatureLevel> featureLevels)
Parameters
| Type | Name | Description |
|---|---|---|
| nint | 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. |
| ReadOnlySpan<D3D11FeatureLevel> | featureLevels | Determine the order of feature levels to attempt to create. |
Returns
| Type | Description |
|---|---|
| D3D11DeviceAndContext | The device, context, and feature level. |
Dispose()
Declaration
public void Dispose()