B.Render.Texture()

Represents a 2D-texture or cubemap.

To create the object use device.makeTexture().

METHODS:

device()

Returns linked rendering device.

RETURNS:

width()

Returns width.

RETURNS:

{number}

height()

Returns height.

RETURNS:

{number}

size()

Returns width and height.

RETURNS:

format()

Returns surface format.

RETURNS:

mipCount()

Returns mip levels count.

RETURNS:

{number}

faceCount()

Returns cubemap faces count.

RETURNS:

{number}

mip(mipIndex, faceIndex)

Returns mip level.

PARAMETERS:

{number} [mipIndex] = 0

{B.Render.CubeFace} [faceIndex] = 0

omit for 2D-textures

RETURNS:

{B.Render.Mip | null}

buildMips()

Builds mip levels chain.

RETURNS:

flush()

Flush all mip data sources.

Note: the data won't be restored after device lost.

RETURNS:

free()

Frees all internal data and detach the resource from linked rendering device.

METHODS: