Gama C Library
Gama C API Documentation
gm3Material Struct Reference

Represents a single 3D material with various rendering properties. More...

#include <mtl.h>

Data Fields

char name [64]
gmColor diffuse
gmColor specular
double shininess
double alpha
gmColor emissive
long tex_diffuse
long tex_specular
long tex_alpha
long tex_emissive

Detailed Description

Represents a single 3D material with various rendering properties.

This struct stores properties like diffuse color, specular color, shininess, transparency, and references to different texture maps.

Field Documentation

◆ alpha

double gm3Material::alpha

Transparency (d or Tr), 1.0 is opaque, 0.0 is fully transparent.

◆ diffuse

gmColor gm3Material::diffuse

Diffuse color (Kd) of the material.

◆ emissive

gmColor gm3Material::emissive

Emissive color (Ke) of the material.

◆ name

char gm3Material::name[64]

The name of the material.

◆ shininess

double gm3Material::shininess

Shininess exponent (Ns), typically 0 to 1000.

◆ specular

gmColor gm3Material::specular

Specular color (Ks) of the material.

◆ tex_alpha

long gm3Material::tex_alpha

Index to the alpha (dissolve) texture map (-1 if none).

◆ tex_diffuse

long gm3Material::tex_diffuse

Index to the diffuse texture map in the material library's texture array (-1 if none).

◆ tex_emissive

long gm3Material::tex_emissive

Index to the emissive texture map (-1 if none).

◆ tex_specular

long gm3Material::tex_specular

Index to the specular texture map (-1 if none).


The documentation for this struct was generated from the following file: