Texture2D

Description

abstract class Tinman.Terrain.Rendering.Texture2D

Derived from

ResourceBase abstract
ITexture2D

Extended by

DirectX9Texture2D sealed

Abstract base class for ITexture2D implementations.

Protected / Constructors

Texture2​D


protected constructor Texture2D → (7)

width in : int32

[>0]
The texture width, in texels.

height in : int32

[>0]
The texture height, in texels.

mipmaps in : int32

[>=0]
The number of mipmap levels.If 0 the number of levels will be inferred from width in and height in.

format in : TextureFormat

[not-null]
The texture format.

srgb in : bool

The sRGB behaviour

accessPattern in : ResourceAccessPattern

The resource access pattern.

count in : int32

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

Creates a new instance of Texture2D.

Protected / Methods

Buffer


protected method Buffer → (2)

data in : IntPtr

Points to the first byte of the memory block.

capacity in : int32

The memory block size, in bytes.

returns → ByteBuffer

The raw byte buffer.

Returns a raw byte buffer that wraps the given memory block.

Do​Set​Texels


protected method DoSetTexels → (4)

source in : TexelBuffer

The source data of the texture update.

targetIdx opt : int32 = 0

The target texture slice.

targetX opt : int32 = 0

The target X-coordinate.

targetY opt : int32 = 0

The target Y-coordinate.

returns → bool

true if the texture update was successful,
false if it has failed.

Updates a region of this texture.

Do​Set​Texels_​Begin


[EmptyBody]
protected virtual method DoSetTexels_Begin → (2)

width in : int32

Width of the texture update rectangle.

height in : int32

Height of the texture update rectangle.

returns → bool

true if the texture update has begun and must be completed by subsequent calls to DoSetTexels_Region, followed by a final call to DoSetTexels_End,
false if the texture update is not possible and must be skipped.

Called by DoSetTexels to begin the texture update.

Do​Set​Texels_​End


[EmptyBody]
protected virtual method DoSetTexels_End → ()

Called by DoSetTexels to finish the texture update.

Do​Set​Texels_​Region


protected abstract method DoSetTexels_Region → (5)

level in : int32

The mipmap level.

buffer in : TexelBuffer

The texel buffer for level in.

targetIdx in : int32

The target texture slice.

targetX in : int32

The target X-coordinate.

targetY in : int32

The target Y-coordinate.

returns → bool

true if the texture update has succeeded,
false if is has failed.

Called by DoSetTexels for each mipmap level.

Protected / Attributes

count


protected readonly attribute count → (int32)

The number of texture array slices.

format


protected attribute format → (TextureFormat)

The texture format.

height


protected readonly attribute height → (int32)

The texture height.

mipmaps


protected readonly attribute mipmaps → (int32)

The number of mipmap levels.

width


protected readonly attribute width → (int32)

The texture width.

Logging

Logger


public static readonly attribute Logger → (ILogger)

The logger object of this class.