Texture

A texture.

Constructors

this
this(uint width, uint height, TextureFormat format)

Constructs a new texture.

this
this(TextureData data)

Constructs a new texture.

Destructor

~this
~this()
Undocumented in source.

Members

Functions

resize
void resize(uint width, uint height)

Resizes the texture.

Properties

channels
uint channels [@property getter]

Channel count of the texture.

format
TextureFormat format [@property getter]

Format of the texture.

height
uint height [@property getter]

Height of the texture in pixels.

length
uint length [@property getter]

Length of the resource's data allocation in bytes.

pixels
void[] pixels [@property getter]

Pixel data of the texture.

width
uint width [@property getter]

Width of the texture in pixels.

Static functions

create
Texture create(uint width, uint height, TextureFormat format)

Creates a new texture.

createForData
Texture createForData(TextureData data)

Creates a new texture with the given texture data.

Variables

data
TextureData data;

Texture data.

Inherited Members

From Resource

length
uint length [@property getter]

Length of the resource's data allocation in bytes.

id
ResourceID id;

ID of a resource, differs based on the underlying rendering API.

Meta