| libg3d Reference Manual | ||||
|---|---|---|---|---|
#include <g3d/material.h>
G3DMaterial;
G3DMaterial* g3d_material_new (void);
void g3d_material_free (G3DMaterial *material);
typedef struct {
gchar *name;
G3DFloat r, g, b, a;
G3DFloat shininess;
G3DFloat specular[4];
guint32 flags;
G3DImage *tex_image;
} G3DMaterial;
A material object.
gchar * |
name of material |
G3DFloat |
red component of color |
G3DFloat |
green component of color |
G3DFloat |
blue component of color |
G3DFloat |
alpha component of color |
G3DFloat |
shiny color |
G3DFloat |
specular color |
guint32 |
flags |
G3DImage * |
texture image (optional, may be NULL) |
G3DMaterial* g3d_material_new (void);
Generates a new material with a default color.
Returns : |
the new material or NULL on error |
void g3d_material_free (G3DMaterial *material);
Frees all memory allocated for that material.
|
the material to free |