Class

TexInfo

TexInfo(src)

Constructor

# 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

number

# address

texture mem address (if downloaded)

number

# aspectRatio

aspect ratio

string

# filename

filename

number

# format

texture format

number

# largeLod

large LOD

number

# smallLod

small LOD

number

# tableType

table type

number

# textureSize

size of texture

number

# 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.

size of texture in bytes.

number

# Source(evenOdd)

specify this TexInfo as the current texture source for rendering.

Parameters:
Name Type Description
evenOdd GR_MIPMAPLEVELMASK

one of GR_MIPMAPLEVELMASK.