Struct TextureViewDescription
- Namespace
- NeoVeldrid
- Assembly
- NeoVeldrid.dll
Describes a TextureView, for creation using a ResourceFactory.
public struct TextureViewDescription : IEquatable<TextureViewDescription>
- Implements
- Inherited Members
Constructors
TextureViewDescription(Texture)
Constructs a new TextureViewDescription.
public TextureViewDescription(Texture target)
Parameters
targetTextureThe desired target Texture. This Texture must have been created with the Sampled usage flag.
TextureViewDescription(Texture, PixelFormat)
Constructs a new TextureViewDescription.
public TextureViewDescription(Texture target, PixelFormat format)
Parameters
targetTextureThe desired target Texture. This Texture must have been created with the Sampled usage flag.
formatPixelFormatSpecifies 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, uint, uint, uint, uint)
Constructs a new TextureViewDescription.
public TextureViewDescription(Texture target, PixelFormat format, uint baseMipLevel, uint mipLevels, uint baseArrayLayer, uint arrayLayers)
Parameters
targetTextureThe desired target Texture.
formatPixelFormatSpecifies 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.
baseMipLeveluintThe base mip level visible in the view. Must be less than MipLevels.
mipLevelsuintThe number of mip levels visible in the view.
baseArrayLayeruintThe base array layer visible in the view.
arrayLayersuintThe number of array layers visible in the view.
TextureViewDescription(Texture, uint, uint, uint, uint)
Constructs a new TextureViewDescription.
public TextureViewDescription(Texture target, uint baseMipLevel, uint mipLevels, uint baseArrayLayer, uint arrayLayers)
Parameters
targetTextureThe desired target Texture.
baseMipLeveluintThe base mip level visible in the view. Must be less than MipLevels.
mipLevelsuintThe number of mip levels visible in the view.
baseArrayLayeruintThe base array layer visible in the view.
arrayLayersuintThe number of array layers visible in the view.
Fields
ArrayLayers
The number of array layers visible in the view.
public uint ArrayLayers
Field Value
BaseArrayLayer
The base array layer visible in the view.
public uint BaseArrayLayer
Field Value
BaseMipLevel
The base mip level visible in the view. Must be less than MipLevels.
public uint BaseMipLevel
Field Value
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.
public PixelFormat? Format
Field Value
MipLevels
The number of mip levels visible in the view.
public uint MipLevels
Field Value
Target
The desired target Texture.
public Texture Target
Field Value
Methods
Equals(TextureViewDescription)
Element-wise equality.
public bool Equals(TextureViewDescription other)
Parameters
otherTextureViewDescriptionThe instance to compare to.
Returns
- bool
True if all elements are equal; false otherswise.
GetHashCode()
Returns the hash code for this instance.
public override int GetHashCode()
Returns
- int
A 32-bit signed integer that is the hash code for this instance.