B.Render.Mip()

Represents a texture mip level.

To get the object use texture.mip().

FUNCTIONS:

calcMaxCount(textureSize)

Calculates maximum mip levels count of given texture size.

PARAMETERS:

{number} textureSize

RETURNS:

{number}

calcSize(textureSize, mipIndex)

Calculates size of specified mip level from given texture size.

PARAMETERS:

{number} textureSize

{number} mipIndex

RETURNS:

{number}

METHODS:

device()

Returns linked rendering device.

RETURNS:

texture()

Returns linked texture.

RETURNS:

index()

Returns index of this mip level.

RETURNS:

{number}

count()

Returns mip levels count of linked texture.

RETURNS:

{number}

face()

Returns cubemap face of this mip level (always 0 for 2D-textures).

RETURNS:

faceCount()

Returns cubemap face count of linked texture.

RETURNS:

{number}

width()

Returns width.

RETURNS:

{number}

height()

Returns height.

RETURNS:

{number}

size()

Returns width and height.

RETURNS:

format()

Returns surface format.

RETURNS:

source(source)

Sets texel data source.

PARAMETERS:

{null | Uint8Array | Float32Array | ImageData | HTMLImageElement | HTMLCanvasElement | HTMLVideoElement} source

RETURNS:

{B.Render.Mip}

this

THROWS:

{B.Render.Error}

if source is inappropriate or has invalid size

source()

Gets texel data source.

RETURNS:

{null | Uint8Array | Float32Array | ImageData | HTMLImageElement | HTMLCanvasElement | HTMLVideoElement}

flush()

Flush linked data source.

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

RETURNS:

{B.Render.Mip}

this

pitch()

Returns data pitch (in bytes).

RETURNS:

{number}

rows()

Returns data rows count.

RETURNS:

{number}

byteSize()

Returns data size (in bytes).

RETURNS:

{number}

FUNCTIONS:

METHODS: