Class D3D11Utils
Utility methods.
Inherited Members
Namespace: JeremyAnsel.DirectX.D3D11
Assembly: JeremyAnsel.DirectX.D3D11.dll
Syntax
public static class D3D11Utils
Methods
| Edit this page View SourceCalcSubresource(uint, uint, uint)
Calculates a subresource index for a texture.
Declaration
public static uint CalcSubresource(uint mipSlice, uint arraySlice, uint mipLevels)
Parameters
| Type | Name | Description |
|---|---|---|
| uint | mipSlice | A zero-based index for the mipmap level to address; 0 indicates the first, most detailed mipmap level |
| uint | arraySlice | The zero-based index for the array level to address; always use 0 for volume (3D) textures. |
| uint | mipLevels | Number of mipmap levels in the resource. |
Returns
| Type | Description |
|---|---|
| uint | The index which equals |
DisposeAndNull<T>(ref T?)
Immediately releases the unmanaged resources.
Declaration
public static void DisposeAndNull<T>(ref T? o) where T : class, ID3D11Releasable
Parameters
| Type | Name | Description |
|---|---|---|
| T | o | The object. |
Type Parameters
| Name | Description |
|---|---|
| T | A releasable type. |
ReleaseAndNull<T>(ref T?)
Releases the managed reference to the COM interface.
Declaration
public static void ReleaseAndNull<T>(ref T? o) where T : class, ID3D11Releasable
Parameters
| Type | Name | Description |
|---|---|---|
| T | o | The COM interface. |
Type Parameters
| Name | Description |
|---|---|
| T | A releasable type. |