TextureFactory

Description

abstract class Tinman.Terrain.Rendering.TextureFactory

Abstract base class for ITextureFactory implementations.

These protected fields must be initialized by subclasses in the constructor:

Protected / Constructors

Texture​Factory


protected constructor TextureFactory → ()

Creates a new instance of TextureFactory.

Protected / Methods

Do​Create​Texture2​D


[OwnerReturn]
protected abstract method DoCreateTexture2D → (7)

width in : int32

The validated texture width.

height in : int32

The validated texture height.

mipmaps in : int32

The validated mipmap level count.

format in : TextureFormat

The validated texture format.

srgb in : bool

The sRGB behaviour of the created texture (see ITexture.IsSrgb).

count in : int32

The number of texture array slices.

content in : TexelBuffer [ ]

The static texture content for each texture slice or null to create a dynamic texture.

returns → ITexture2D

The created texture.

Creates a new instance of ITexture2D.

RenderException

If a graphics subsystem error has occurred.

Do​Validate​Texture​Format


protected abstract method DoValidateTextureFormat → (2)

format in : TextureFormat

The texture format.

srgb in : bool

The sRGB behaviour.

returns → bool

true if format in can be used with this graphics context, false if not.

Validates the given texture format for use with this graphics context.

Protected / Attributes

available​Video​Memory


protected attribute availableVideoMemory → (int64)

The available video memory, in bytes.

This field must be initialized by subclasses during construction.

maximum​Size


protected attribute maximumSize → (int64)

Returns the maximum size of a single texture resource in bytes or 0 if none.

This field must be initialized by subclasses during construction.

texture​Size​Maximum


protected attribute textureSizeMaximum → (int32)

The maximum texture size (always a power of two).

This field must be initialized by subclasses during construction.

texture​Size​Must​Be​Power​Of​Two


protected attribute textureSizeMustBePowerOfTwo → (bool)

The texture size must be a power of two, but width and height can still be different.

This field must be initialized by subclasses during construction.

texture​Size​Must​Be​Square


protected attribute textureSizeMustBeSquare → (bool)

Textures must be square, i.e. width and height must be equal?.

This field must be initialized by subclasses during construction.

texture​Slice​Maximum


protected attribute textureSliceMaximum → (int32)

The maximum number of texture array slices.

This field must be initialized by subclasses during construction.

Logging

Logger


public static readonly attribute Logger → (ILogger)

The logger object of this class.