##### Ninja Library - Model and Motion Structure

# NJS_MATERIAL

Structure that stores model and material data

### DEFINITION

      typedef struct {
              NJS_COLOR       diffuse;
              NJS_COLOR       specular;
              Float           exponent;
              Uint32          attr_texId;
              Uint32          attrflags;
      } NJS_MATERIAL;

### MEMBER

  `diffuse` | Diffuse color (0 to 255)
  `specular` | Specular color (0 to 255)
  `exponent` | Exponent (spread of highlight)
  `attr_texId` | Attribute and texture ID
  `attrflags` | Attribute flag

### DESCRIPTION

  Structure that stores model and material data. Member "attr_texId" which indicates attribute and texture ID is as follows; 0 bit-28 bit texture number in texture list, 31 bit-29 bit reserved system.

  Each bit of member "attrflags" which indicates attribute flag is as follows.

  Bit | Meaning
  31 - 29 | [alpha] blending parameter (SRC)
  28 - 26 | [alpha] blending parameter (DST)
  25 | Ignore light source flag (ignored when "1")
  24 | Flat shading (on/off)
  23 | Double-sided polygon (on/off)
  22 | Environment mapping (on/off)
  21 | Texture (enabled/disabled)
  20 | [alpha] (enabled/disabled)
  19 | Ignore specular (ignored when "1")
  18 - 17 | Flip control
  16 - 15 | Clamp control
  14 - 13 | 0 : Point Sampled / 1 : Bilinear Filter / 2 : Trilinear Filter
  11 - 8 | Anisotropic Filter
  7 | Mipmap range adjustment - 16 levels
  6 - 0 | Unused

NJS_MATERIAL

COPYRIGHT © SEGA ENTERPRISES, LTD., 1998,1999