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

View Source doc/classes.js, line 310

Members

# static address

texture mem address (if downloaded)

View Source doc/classes.js, line 342

# static aspectRatio

aspect ratio

View Source doc/classes.js, line 326

# static filename

filename

View Source doc/classes.js, line 314

# static format

texture format

View Source doc/classes.js, line 330

# static largeLod

large LOD

View Source doc/classes.js, line 318

# static smallLod

small LOD

View Source doc/classes.js, line 322

# static tableType

table type

View Source doc/classes.js, line 334

# static textureSize

size of texture

View Source doc/classes.js, line 338

# static tmu

TMU (if downloaded)

View Source doc/classes.js, line 346

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.

View Source doc/classes.js, line 354

# MarkUnused()

mark the texture as 'not downloaded' again.

View Source doc/classes.js, line 358

# MemRequired(evenOdd) → {number}

return the texture memory consumed by a texture
Parameters:
Name Type Description
evenOdd GR_MIPMAPLEVELMASK one of GR_MIPMAPLEVELMASK.

View Source doc/classes.js, line 369

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.

View Source doc/classes.js, line 363