Struct TextureDescription
Describes a 2D texture.
Implements
Inherited Members
Namespace: Evergine.Common.Graphics
Assembly: Evergine.Common.dll
Syntax
public struct TextureDescription : IEquatable<TextureDescription>
Fields
ArraySize
Number of textures in the texture array.
Declaration
public uint ArraySize
Field Value
Type | Description |
---|---|
uint |
CpuAccess
Flags ResourceCpuAccess to specify the type of CPU access allowed.
Declaration
public ResourceCpuAccess CpuAccess
Field Value
Type | Description |
---|---|
ResourceCpuAccess |
Depth
Texture Depth (in texels).
Declaration
public uint Depth
Field Value
Type | Description |
---|---|
uint |
Faces
Number of texture faces useful in TextureCube and TextureCubeArray.
Declaration
public uint Faces
Field Value
Type | Description |
---|---|
uint |
Flags
The texture flags TextureFlags.
Declaration
public TextureFlags Flags
Field Value
Type | Description |
---|---|
TextureFlags |
Format
Texture format PixelFormat.
Declaration
public PixelFormat Format
Field Value
Type | Description |
---|---|
PixelFormat |
Height
Texture height (in texels).
Declaration
public uint Height
Field Value
Type | Description |
---|---|
uint |
MipLevels
The maximum number of mipmap levels in the texture.
Declaration
public uint MipLevels
Field Value
Type | Description |
---|---|
uint |
SampleCount
The number of samples in this texture.
Declaration
public TextureSampleCount SampleCount
Field Value
Type | Description |
---|---|
TextureSampleCount |
Type
Texture type TextureType.
Declaration
public TextureType Type
Field Value
Type | Description |
---|---|
TextureType |
Usage
Value that identifies how the texture is to be read from and written to.
Declaration
public ResourceUsage Usage
Field Value
Type | Description |
---|---|
ResourceUsage |
Width
Texture width (in texels).
Declaration
public uint Width
Field Value
Type | Description |
---|---|
uint |
Methods
CreateTexture1DDescription(uint, PixelFormat)
Create a Texture 1D description.
Declaration
public static TextureDescription CreateTexture1DDescription(uint width, PixelFormat format = PixelFormat.R8G8B8A8_UNorm)
Parameters
Type | Name | Description |
---|---|---|
uint | width | The texture width. |
PixelFormat | format | The texture format. |
Returns
Type | Description |
---|---|
TextureDescription | The new texture 1D description. |
CreateTexture2DDescription(uint, uint, PixelFormat)
Create a Texture 2D description.
Declaration
public static TextureDescription CreateTexture2DDescription(uint width, uint height, PixelFormat format = PixelFormat.R8G8B8A8_UNorm)
Parameters
Type | Name | Description |
---|---|---|
uint | width | The texture width. |
uint | height | The texture height. |
PixelFormat | format | The texture format. |
Returns
Type | Description |
---|---|
TextureDescription | The new texture 2D description. |
CreateTexture3DDescription(uint, uint, uint, PixelFormat)
Create a Texture 3D description.
Declaration
public static TextureDescription CreateTexture3DDescription(uint width, uint height, uint depth, PixelFormat format = PixelFormat.R8G8B8A8_UNorm)
Parameters
Type | Name | Description |
---|---|---|
uint | width | The texture width. |
uint | height | The texture height. |
uint | depth | The texture depth. |
PixelFormat | format | The texture format. |
Returns
Type | Description |
---|---|
TextureDescription | The new texture 3D description. |
CreateTextureCubeDescription(uint, uint, PixelFormat)
Create a Texture cube description.
Declaration
public static TextureDescription CreateTextureCubeDescription(uint width, uint height, PixelFormat format = PixelFormat.R8G8B8A8_UNorm)
Parameters
Type | Name | Description |
---|---|---|
uint | width | The texture width. |
uint | height | The texture height. |
PixelFormat | format | The texture format. |
Returns
Type | Description |
---|---|
TextureDescription | The new texture cube description. |
Equals(TextureDescription)
Returns a hash code for this instance.
Declaration
public bool Equals(TextureDescription other)
Parameters
Type | Name | Description |
---|---|---|
TextureDescription | other | Other used to compare. |
Returns
Type | Description |
---|---|
bool | A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. |
Equals(object)
Determines whether the specified object is equal to this instance.
Declaration
public override bool Equals(object obj)
Parameters
Type | Name | Description |
---|---|---|
object | obj | The object to compare with this instance. |
Returns
Type | Description |
---|---|
bool |
|
Overrides
GetHashCode()
Returns a hash code for this instance.
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
int | A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. |
Overrides
Operators
operator ==(TextureDescription, TextureDescription)
Implements the operator ==.
Declaration
public static bool operator ==(TextureDescription value1, TextureDescription value2)
Parameters
Type | Name | Description |
---|---|---|
TextureDescription | value1 | The value1. |
TextureDescription | value2 | The value2. |
Returns
Type | Description |
---|---|
bool | The result of the operator. |
operator !=(TextureDescription, TextureDescription)
Implements the operator ==.
Declaration
public static bool operator !=(TextureDescription value1, TextureDescription value2)
Parameters
Type | Name | Description |
---|---|---|
TextureDescription | value1 | The value1. |
TextureDescription | value2 | The value2. |
Returns
Type | Description |
---|---|
bool | The result of the operator. |