##### Ninja Library - Texture Function

# njCalcTextureSize

Calculates texture size

### FORMAT

`

  Uint32 njCalcTextureSize(nWidth, nHeight, nTextureType)
  Uint32 nWidth
  Uint32 nHeight
  Uint32 nTextureType

`

### PARAMETER

  `nWidth` | Texture width (8 to 1024)
  `nHeight` | Texture height (8 to 1024)
  `nTextureType` | Texture type

### RETURN

  Texture size (in bytes)

### DESCRIPTION

  Calculates the texture size when it was developed in texture memory from a specified texture size and type. Therefore, calculations also include dummy data for a texture with dummy data entered at the lead.

  Texture dimensions designate a range of 8 to 1024 pixels by 2 to the nth power.

  The argument that designates texture type, nTextureType, has the following constants.

  NJD_TEXFMT_TWIDDLED | (0x0100)
  NJD_TEXFMT_TWIDDLED_MM | (0x0200)
  NJD_TEXFMT_VQ | (0x0300)
  NJD_TEXFMT_VQ_MM | (0x0400)
  NJD_TEXFMT_PALETTIZE4 | (0x0500)
  NJD_TEXFMT_PALETTIZE4_MM | (0x0600)
  NJD_TEXFMT_PALETTIZE8 | (0x0700)
  NJD_TEXFMT_PALETTIZE8_MM | (0x0800)
  NJD_TEXFMT_RECTANGLE | (0x0900)
  NJD_TEXFMT_STRIDE | (0x0B00)
  NJD_TEXFMT_TWIDDLED_RECTANGLE | (0x0D00)
  NJD_TEXFMT_SMALLVQ | (0x1000)
  NJD_TEXFMT_SMALLVQ_MM | (0x1100)

### EXAMPLE

      size = njCalcTextureSize( 256, 256, NJD_TEXFMT_TWIDDLED_MM );

njCalcTextureSize

COPYRIGHT © SEGA ENTERPRISES, LTD., 1998,1999