abstract class Tinman.Terrain.Rendering.Texture2D

Derived from

ResourceBase abstract

Extended by

DirectX9Texture2D sealed

Abstract base class for ITexture2D implementations.

Protected / Constructors


protected constructor Texture2D → (7)

width in : int32

The texture width, in texels.

height in : int32

The texture height, in texels.

mipmaps in : int32

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

format in : TextureFormat

The texture format.

srgb in : bool

The sRGB behaviour

accessPattern in : ResourceAccessPattern

The resource access pattern.

count in : int32

The number of texture array slices.

Creates a new instance of Texture2D.

Protected / Methods


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.


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.


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.


protected virtual method DoSetTexels_End → ()

Called by DoSetTexels to finish the texture update.


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


protected readonly attribute count → (int32)

The number of texture array slices.


protected attribute format → (TextureFormat)

The texture format.


protected readonly attribute height → (int32)

The texture height.


protected readonly attribute mipmaps → (int32)

The number of mipmap levels.


protected readonly attribute width → (int32)

The texture width.



public static readonly attribute Logger → (ILogger)

The logger object of this class.