typedef struct { NJS_COLOR diffuse; NJS_COLOR specular; Float exponent; Uint32 attr_texId; Uint32 attrflags; } NJS_MATERIAL;
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 |
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 |