ITexture2D

Description

interface Tinman.Terrain.Rendering.ITexture2D

Derived from

ITexture

Extended by

Texture2D abstract

Base interface for two-dimensional texture resources for rendering.

Public / Methods

SetTexels


public method SetTexels → (4)

source in : TexelBuffer

[not-null]
The source buffer that holds the texel data.

targetIdx opt : int32 = 0

[0..ITexture2D.Count-1]
The target texture array slice.

targetX opt : int32 = 0

[0..ITexture2D.Width-source.Width]
X-coordinate of top-left target texel.

targetY opt : int32 = 0

[0..ITexture2D.Height-source.Height]
Y-coordinate of top-left target texel.

Updates a rectangular region of this texture with GpuUpdateFlag.Discard semantic.

The given target coordinates must be a multiple of the block size of the texture format (see TextureFormat.BlockSize).

Public / Attributes

Count


public attribute Count → (get)

value : int32

[>=1]
The number of texture array slices.

The number of texture array slices.

No explicit distinction is made between regular 2D textures and texture arrays with only one slice.

Height


public attribute Height → (get)

value : int32

The texture height, in texels.

The texture height, in texels.

Width


public attribute Width → (get)

value : int32

The texture width, in texels.

The texture width, in texels.

Extensions

SetTexels


public static method SetTexels → (4)

source in : ColorBuffer

[not-null]
The source buffer that holds the texel data.

targetIdx opt : int32 = 0

[>=0]
The target texture array slice.

targetX opt : int32 = 0

[>=0]
X-coordinate of top-left target texel.

targetY opt : int32 = 0

[>=0]
Y-coordinate of top-left target texel.

Copies a region of pixels from the given buffer to this texture data object, encoding them as necessary.

This method encodes the pixels and then sets the texel data by calling ITexture2D.SetTexels.