Header menu logo Nu

TextureInternal Type

An internal representation of a texture as managed by Vulkan.

Record fields

Record Field Description

AttachmentMode_

Full Usage: AttachmentMode_

Field type: AttachmentMode
Field type: AttachmentMode

Id_

Full Usage: Id_

Field type: uint32
Field type: uint32

ImageUsages_

Full Usage: ImageUsages_

Field type: VkImageUsageFlags
Field type: VkImageUsageFlags

InternalFormat_

Full Usage: InternalFormat_

Field type: ImageFormat
Field type: ImageFormat

MipLevels_

Full Usage: MipLevels_

Field type: int
Field type: int

PixelFormat_

Full Usage: PixelFormat_

Field type: PixelFormat
Field type: PixelFormat

TextureMetadata_

Full Usage: TextureMetadata_

Field type: TextureMetadata
Modifiers: mutable
Field type: TextureMetadata

TextureType_

Full Usage: TextureType_

Field type: TextureType
Field type: TextureType

TextureWrapper_

Full Usage: TextureWrapper_

Field type: TextureWrapper
Modifiers: mutable
Field type: TextureWrapper

Instance members

Instance member Description

this.Id

Full Usage: this.Id

Returns: uint32

The id.

Returns: uint32

this.Image

Full Usage: this.Image

Returns: VkImage

The image.

Returns: VkImage

this.ImageView

Full Usage: this.ImageView

Returns: VkImageView

The image view.

Returns: VkImageView

this.InternalFormat

Full Usage: this.InternalFormat

Returns: ImageFormat

The internal format.

Returns: ImageFormat

this.LayerViews

Full Usage: this.LayerViews

Returns: VkImageView array

The image views for each layer.

Returns: VkImageView array

this.MipLevels

Full Usage: this.MipLevels

Returns: int

The mip level count.

Returns: int

this.SubViews

Full Usage: this.SubViews

Returns: VkImageView[,]

The image views for each mip level and layer.

Returns: VkImageView[,]

this.TextureMetadata

Full Usage: this.TextureMetadata

Returns: TextureMetadata

Metadata describing the texture.

Returns: TextureMetadata

this.VkFormat

Full Usage: this.VkFormat

Returns: VkFormat

The VkFormat.

Returns: VkFormat

Static members

Static member Description

TextureInternal.create mipmapMode attachmentMode textureType optionalUsageFlags internalFormat pixelFormat metadata context

Full Usage: TextureInternal.create mipmapMode attachmentMode textureType optionalUsageFlags internalFormat pixelFormat metadata context

Parameters:
Returns: TextureInternal

Create a TextureInternal.

mipmapMode : MipmapMode
attachmentMode : AttachmentMode
textureType : TextureType
optionalUsageFlags : VkImageUsageFlags
internalFormat : ImageFormat
pixelFormat : PixelFormat
metadata : TextureMetadata
context : VulkanContext
Returns: TextureInternal

TextureInternal.createEmpty context

Full Usage: TextureInternal.createEmpty context

Parameters:
Returns: TextureInternal

Create an empty TextureInternal. NOTE: this is for fast empty texture creation. It is not preferred for TextureInternal.empty, which is created from Assets.Default.Image.

context : VulkanContext
Returns: TextureInternal

TextureInternal.createFromData mipmaps compression textureData thread context

Full Usage: TextureInternal.createFromData mipmaps compression textureData thread context

Parameters:
Returns: TextureInternal

Create an internal texture representation from existing texture data. NOTE: this function will destroy textureData.

mipmaps : bool
compression : TextureCompression
textureData : TextureData
thread : TextureLoadThread
context : VulkanContext
Returns: TextureInternal

TextureInternal.destroy textureInternal context

Full Usage: TextureInternal.destroy textureInternal context

Parameters:

Destroy TextureInternal.

textureInternal : TextureInternal
context : VulkanContext

TextureInternal.empty

Full Usage: TextureInternal.empty

Returns: TextureInternal

Represents the empty texture used in Vulkan.

Returns: TextureInternal

TextureInternal.generateMipmaps metadata layer thread textureInternal context

Full Usage: TextureInternal.generateMipmaps metadata layer thread textureInternal context

Parameters:

Generate mipmaps in TextureInternal. Can be done only once, after upload to (only) mip level 0.

metadata : TextureMetadata
layer : int
thread : TextureLoadThread
textureInternal : TextureInternal
context : VulkanContext

TextureInternal.tryCreate minimal mipmaps compression filePath thread context

Full Usage: TextureInternal.tryCreate minimal mipmaps compression filePath thread context

Parameters:
Returns: Either<string, TextureInternal>

Attempt to create an internal texture representation from a file.

minimal : bool
mipmaps : bool
compression : TextureCompression
filePath : string
thread : TextureLoadThread
context : VulkanContext
Returns: Either<string, TextureInternal>

TextureInternal.updateSize textureMetadata textureInternal context

Full Usage: TextureInternal.updateSize textureMetadata textureInternal context

Parameters:

Check that the current texture size is the same as the given size, resizing if necessary. If used, must be called every frame.

textureMetadata : TextureMetadata
textureInternal : TextureInternal
context : VulkanContext

TextureInternal.upload metadata mipLevel layer pixels thread textureInternal context

Full Usage: TextureInternal.upload metadata mipLevel layer pixels thread textureInternal context

Parameters:

Upload pixel data to TextureInternal. Can only be done once.

metadata : TextureMetadata
mipLevel : int
layer : int
pixels : nativeint
thread : TextureLoadThread
textureInternal : TextureInternal
context : VulkanContext

TextureInternal.uploadArray metadata mipLevel layer array thread textureInternal context

Full Usage: TextureInternal.uploadArray metadata mipLevel layer array thread textureInternal context

Parameters:

Upload array of pixel data to TextureInternal. Can only be done once.

metadata : TextureMetadata
mipLevel : int
layer : int
array : byte array
thread : TextureLoadThread
textureInternal : TextureInternal
context : VulkanContext

TextureInternal.uploadArrayAsync commandBuffer metadata mipLevel layer array textureInternal context

Full Usage: TextureInternal.uploadArrayAsync commandBuffer metadata mipLevel layer array textureInternal context

Parameters:

Record commands to upload array of pixel data to TextureInternal. Can only be done once.

commandBuffer : VkCommandBuffer
metadata : TextureMetadata
mipLevel : int
layer : int
array : 'a array
textureInternal : TextureInternal
context : VulkanContext

TextureInternal.uploadAsync commandBuffer metadata mipLevel layer pixels textureInternal context

Full Usage: TextureInternal.uploadAsync commandBuffer metadata mipLevel layer pixels textureInternal context

Parameters:

Record commands to upload pixel data to TextureInternal. Can only be done once.

commandBuffer : VkCommandBuffer
metadata : TextureMetadata
mipLevel : int
layer : int
pixels : nativeint
textureInternal : TextureInternal
context : VulkanContext

Type something to start searching.