[]
        
(Showing Draft Content)

GrapeCity.Documents.DX.Direct3D11.Resource

Class Resource

Namespace
GrapeCity.Documents.DX.Direct3D11
Assembly
GcDocs.DX.Windows.dll

ID3D11Resource

[Guid("dc8e63f3-d12b-4952-b47b-5e45026a862d")]
public class Resource : DeviceChild, IDisposable, IUnknown
Inheritance
object
Resource
Implements
System.IDisposable
Inherited Members
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()

Constructors

Resource(IntPtr)

Initializes a new instance of the Resource class.

public Resource(IntPtr nativePtr)

Parameters

nativePtr System.IntPtr

The native pointer.

Fields

MaximumMipLevels

Constant MaximumMipLevels.

public const int MaximumMipLevels = 15

Field Value

int

MaximumTexture1DArraySize

Constant MaximumTexture1DArraySize.

public const int MaximumTexture1DArraySize = 2048

Field Value

int

MaximumTexture1DSize

Constant MaximumTexture1DSize.

public const int MaximumTexture1DSize = 16384

Field Value

int

MaximumTexture2DArraySize

Constant MaximumTexture2DArraySize.

public const int MaximumTexture2DArraySize = 2048

Field Value

int

MaximumTexture2DSize

Constant MaximumTexture2DSize.

public const int MaximumTexture2DSize = 16384

Field Value

int

MaximumTexture3DSize

Constant MaximumTexture3DSize.

public const int MaximumTexture3DSize = 2048

Field Value

int

MaximumTextureCubeSize

Constant MaximumTextureCubeSize.

public const int MaximumTextureCubeSize = 16384

Field Value

int

ResourceSizeInMegabytes

Constant ResourceSizeInMegabytes.

public const int ResourceSizeInMegabytes = 128

Field Value

int

Methods

CalculateMipSize(int, int)

Calculates the resulting size at a single level for an original size.

public static int CalculateMipSize(int mipLevel, int baseSize)

Parameters

mipLevel int

The mip level to get the size.

baseSize int

Size of the base.

Returns

int

Size of the mipLevel

CalculateSubResourceIndex(int, int, out int)

Calculates the sub resource index for a particular mipSlice and arraySlice.

public virtual int CalculateSubResourceIndex(int mipSlice, int arraySlice, out int mipSize)

Parameters

mipSlice int

The mip slice.

arraySlice int

The array slice.

mipSize int

The size of slice. This values is resource dependent. Texture1D -> mipSize of the Width. Texture2D -> mipSize of the Height. Texture3D -> mipsize of the Depth

Returns

int

The resulting miplevel calulated for this instance with this mipSlice and arraySlice.

FromSwapChain<T>(SwapChain, int)

Gets a swap chain back buffer.

public static T FromSwapChain<T>(SwapChain swapChain, int index) where T : Resource

Parameters

swapChain SwapChain

The swap chain to get the buffer from.

index int

The index of the desired buffer.

Returns

T

The buffer interface, or null on failure.

Type Parameters

T

The type of the buffer.

GetDimension()

void ID3D11Resource::GetType([Out] D3D11_RESOURCE_DIMENSION* pResourceDimension)

public ResourceDimension GetDimension()

Returns

ResourceDimension

GetEvictionPriority()

unsigned int ID3D11Resource::GetEvictionPriority()

public int GetEvictionPriority()

Returns

int

SetEvictionPriority(int)

void ID3D11Resource::SetEvictionPriority([In] unsigned int EvictionPriority)

public void SetEvictionPriority(int evictionPriority)

Parameters

evictionPriority int

SubResourceIndexFromMipLevel(int, int, int)

Calculates the sub resource index from a miplevel.

public static int SubResourceIndexFromMipLevel(int mipSlice, int arraySlice, int mipLevel)

Parameters

mipSlice int

A zero-based index for the mipmap level to address; 0 indicates the first, most detailed mipmap level.

arraySlice int

The zero-based index for the array level to address; always use 0 for volume (3D) textures.

mipLevel int

Number of mipmap levels in the resource.

Returns

int

The index which equals MipSlice + (ArraySlice * MipLevels).

Operators

explicit operator Resource(IntPtr)

Performs an explicit conversion from System.IntPtr to Resource.

public static explicit operator Resource(IntPtr nativePointer)

Parameters

nativePointer System.IntPtr

Returns

Resource