Struct TextureViewDescription
Describes a TextureView, for creation using a ResourceFactory.
Implements
Inherited Members
Namespace: Veldrid
Assembly: cs.temp.dll.dll
Syntax
public struct TextureViewDescription : IEquatable<TextureViewDescription>
Constructors
TextureViewDescription(Texture)
Constructs a new TextureViewDescription.
Declaration
public TextureViewDescription(Texture target)
Parameters
Type | Name | Description |
---|---|---|
Texture | target | The desired target Texture. This Texture must have been created with the Sampled usage flag. |
TextureViewDescription(Texture, UInt32, UInt32, UInt32, UInt32)
Constructs a new TextureViewDescription.
Declaration
public TextureViewDescription(Texture target, uint baseMipLevel, uint mipLevels, uint baseArrayLayer, uint arrayLayers)
Parameters
Type | Name | Description |
---|---|---|
Texture | target | The desired target Texture. |
System.UInt32 | baseMipLevel | The base mip level visible in the view. Must be less than MipLevels. |
System.UInt32 | mipLevels | The number of mip levels visible in the view. |
System.UInt32 | baseArrayLayer | The base array layer visible in the view. |
System.UInt32 | arrayLayers | The number of array layers visible in the view. |
TextureViewDescription(Texture, PixelFormat)
Constructs a new TextureViewDescription.
Declaration
public TextureViewDescription(Texture target, PixelFormat format)
Parameters
Type | Name | Description |
---|---|---|
Texture | target | The desired target Texture. This Texture must have been created with the Sampled usage flag. |
PixelFormat | format | Specifies how the data within the target Texture will be viewed. This format must be "compatible" with the target Texture's. For uncompressed formats, the overall size and number of components in this format must be equal to the underlying format. For compressed formats, it is only possible to use the same PixelFormat or its sRGB/non-sRGB counterpart. |
TextureViewDescription(Texture, PixelFormat, UInt32, UInt32, UInt32, UInt32)
Constructs a new TextureViewDescription.
Declaration
public TextureViewDescription(Texture target, PixelFormat format, uint baseMipLevel, uint mipLevels, uint baseArrayLayer, uint arrayLayers)
Parameters
Type | Name | Description |
---|---|---|
Texture | target | The desired target Texture. |
PixelFormat | format | Specifies how the data within the target Texture will be viewed. This format must be "compatible" with the target Texture's. For uncompressed formats, the overall size and number of components in this format must be equal to the underlying format. For compressed formats, it is only possible to use the same PixelFormat or its sRGB/non-sRGB counterpart. |
System.UInt32 | baseMipLevel | The base mip level visible in the view. Must be less than MipLevels. |
System.UInt32 | mipLevels | The number of mip levels visible in the view. |
System.UInt32 | baseArrayLayer | The base array layer visible in the view. |
System.UInt32 | arrayLayers | The number of array layers visible in the view. |
Fields
ArrayLayers
The number of array layers visible in the view.
Declaration
public uint ArrayLayers
Field Value
Type | Description |
---|---|
System.UInt32 |
BaseArrayLayer
The base array layer visible in the view.
Declaration
public uint BaseArrayLayer
Field Value
Type | Description |
---|---|
System.UInt32 |
BaseMipLevel
The base mip level visible in the view. Must be less than MipLevels.
Declaration
public uint BaseMipLevel
Field Value
Type | Description |
---|---|
System.UInt32 |
Format
An optional PixelFormat which specifies how the data within Target will be viewed. If this value is null, then the created TextureView will use the same PixelFormat as the target Texture. If not null, this format must be "compatible" with the target Texture's. For uncompressed formats, the overall size and number of components in this format must be equal to the underlying format. For compressed formats, it is only possible to use the same PixelFormat or its sRGB/non-sRGB counterpart.
Declaration
public PixelFormat? Format
Field Value
Type | Description |
---|---|
System.Nullable<PixelFormat> |
MipLevels
The number of mip levels visible in the view.
Declaration
public uint MipLevels
Field Value
Type | Description |
---|---|
System.UInt32 |
Target
The desired target Texture.
Declaration
public Texture Target
Field Value
Type | Description |
---|---|
Texture |
Methods
Equals(TextureViewDescription)
Element-wise equality.
Declaration
public bool Equals(TextureViewDescription other)
Parameters
Type | Name | Description |
---|---|---|
TextureViewDescription | other | The instance to compare to. |
Returns
Type | Description |
---|---|
System.Boolean | True if all elements are equal; false otherswise. |
GetHashCode()
Returns the hash code for this instance.
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
System.Int32 | A 32-bit signed integer that is the hash code for this instance. |