Class TextureSource
This class represents the texture asset source.
Implements
Inherited Members
Namespace: Evergine.Framework.Assets
Assembly: Evergine.Framework.dll
Syntax
public class TextureSource : AssetSource, IAssetSource
Properties
AssetParts
Gets the asset parts from the source.
Declaration
public override List<AssetPart> AssetParts { get; }
Property Value
| Type | Description |
|---|---|
| List<AssetPart> |
Overrides
TextureData
Gets or sets the texture information.
Declaration
public TextureDataPart TextureData { get; set; }
Property Value
| Type | Description |
|---|---|
| TextureDataPart |
TextureInfo
Gets or sets the texture information.
Declaration
public TextureInfoPart TextureInfo { get; set; }
Property Value
| Type | Description |
|---|---|
| TextureInfoPart |
Methods
CalcTextureType(bool, bool, uint)
Computes the texture type based on the parameters.
Declaration
public static TextureType CalcTextureType(bool isArray, bool isCubemap, uint baseDepth)
Parameters
| Type | Name | Description |
|---|---|---|
| bool | isArray | Is an array. |
| bool | isCubemap | Is a cubemap. |
| uint | baseDepth | The depth resolution of the base mip level. |
Returns
| Type | Description |
|---|---|
| TextureType | Read the summary. |
CalculateType()
Calculates the texture type.
Declaration
public TextureType CalculateType()
Returns
| Type | Description |
|---|---|
| TextureType | The texture type enum. |
Free()
Frees all resources of this asset source.
Declaration
public override void Free()
Overrides
GetDataBoxes(TextureInfoPart, TextureDataPart)
Gets the texture data boxes.
Declaration
public static DataBox[] GetDataBoxes(TextureInfoPart textureInfo, TextureDataPart textureData)
Parameters
| Type | Name | Description |
|---|---|---|
| TextureInfoPart | textureInfo | The texture info part. |
| TextureDataPart | textureData | The texture data part. |
Returns
| Type | Description |
|---|---|
| DataBox[] | The texture data boxes. |
GetGpuUploadInfo()
Get the information needed to upload the texture to the GPU.
Declaration
public (TextureDescription TextureDesc, DataBox[] DataBoxes) GetGpuUploadInfo()
Returns
| Type | Description |
|---|---|
| (TextureDescription TextureDesc, DataBox[] DataBoxes) | Read the summary. |
GetGpuUploadInfo_KTX(byte[], string)
Given an array of bytes that represents a KTX file, it returns the information needed to upload the texture to the GPU.
Declaration
public static (TextureDescription TextureDesc, DataBox[] DataBoxes) GetGpuUploadInfo_KTX(byte[] bytesArray, string debugId = null)
Parameters
| Type | Name | Description |
|---|---|---|
| byte[] | bytesArray | The bytes array that represents a KTX file. |
| string | debugId | An option debug ID to customize the reported debug messages. |
Returns
| Type | Description |
|---|---|
| (TextureDescription TextureDesc, DataBox[] DataBoxes) | The information needed to upload the texture to the GPU. |
VkFormatToEvergineFormat(VkFormat)
Converts a Vulkan format to an Evergine PixelFormat.
Declaration
public static PixelFormat VkFormatToEvergineFormat(VkFormat vkFormat)
Parameters
| Type | Name | Description |
|---|---|---|
| VkFormat | vkFormat | The Vulkan format to convert. |
Returns
| Type | Description |
|---|---|
| PixelFormat | Read the summary. |