TexInfo(src)

new TexInfo(src)

create new texture from 3df file or a Bitmap.
Parameters:
Name Type Description
src string | Bitmap 3df file to load as texture or Bitmap to convert to texture

Members

static address

texture mem address (if downloaded)

static aspectRatio

aspect ratio

static filename

filename

static format

texture format

static largeLod

large LOD

static smallLod

small LOD

static tableType

table type

static textureSize

size of texture

static tmu

TMU (if downloaded)

Methods

DownloadMipMap(tmu, address, evenOdd)

download the MIP map to texture memory.
Parameters:
Name Type Description
tmu GR_TMU the TMU unit to download to.
address number destination memory address in texture memory.
evenOdd GR_MIPMAPLEVELMASK one of GR_MIPMAPLEVELMASK.

MarkUnused()

mark the texture as 'not downloaded' again.

MemRequired(evenOdd) → {number}

return the texture memory consumed by a texture
Parameters:
Name Type Description
evenOdd GR_MIPMAPLEVELMASK one of GR_MIPMAPLEVELMASK.
Returns:
number - size of texture in bytes.

Source(evenOdd)

specify this TexInfo as the current texture source for rendering.
Parameters:
Name Type Description
evenOdd GR_MIPMAPLEVELMASK one of GR_MIPMAPLEVELMASK.