Top | ![]() |
![]() |
![]() |
![]() |
const GwyRGBA * | gwy_gl_material_get_ambient () |
void | gwy_gl_material_set_ambient () |
const GwyRGBA * | gwy_gl_material_get_diffuse () |
void | gwy_gl_material_set_diffuse () |
const GwyRGBA * | gwy_gl_material_get_specular () |
void | gwy_gl_material_set_specular () |
const GwyRGBA * | gwy_gl_material_get_emission () |
void | gwy_gl_material_set_emission () |
gdouble | gwy_gl_material_get_shininess () |
void | gwy_gl_material_set_shininess () |
void | gwy_gl_material_sample_to_pixbuf () |
void | gwy_gl_material_reset () |
GwyInventory * | gwy_gl_materials () |
GwyGLMaterial * | gwy_gl_materials_get_gl_material () |
#define | GWY_GL_MATERIAL_DEFAULT |
#define | GWY_GL_MATERIAL_NONE |
struct | GwyGLMaterial |
struct | GwyGLMaterialClass |
GwyGLMaterial represents an OpenGL material. Its properties directly map to corresponding OpenGL material characteristics, all are in the range [0,1].
Gradient objects can be obtained from gwy_gl_materials_get_gl_material()
.
New GL materials can be created with gwy_inventory_new_item()
on the
GwyInventory returned by gwy_gl_materials()
.
const GwyRGBA *
gwy_gl_material_get_ambient (GwyGLMaterial *gl_material
);
Gets the ambient reflectance of a GL material.
void gwy_gl_material_set_ambient (GwyGLMaterial *gl_material
,const GwyRGBA *ambient
);
Sets the ambient reflectance of a GL material.
const GwyRGBA *
gwy_gl_material_get_diffuse (GwyGLMaterial *gl_material
);
Gets the diffuse reflectance of a GL material.
void gwy_gl_material_set_diffuse (GwyGLMaterial *gl_material
,const GwyRGBA *diffuse
);
Sets the diffuse reflectance of a GL material.
const GwyRGBA *
gwy_gl_material_get_specular (GwyGLMaterial *gl_material
);
Gets the specular reflectance of a GL material.
void gwy_gl_material_set_specular (GwyGLMaterial *gl_material
,const GwyRGBA *specular
);
Sets the specular reflectance of a GL material.
const GwyRGBA *
gwy_gl_material_get_emission (GwyGLMaterial *gl_material
);
Gets the emission component of a GL material.
void gwy_gl_material_set_emission (GwyGLMaterial *gl_material
,const GwyRGBA *emission
);
Sets the emission component of a GL material.
gdouble
gwy_gl_material_get_shininess (GwyGLMaterial *gl_material
);
Gets the shininess value of a GL material.
void gwy_gl_material_set_shininess (GwyGLMaterial *gl_material
,gdouble shininess
);
Sets the shininess value of a GL material.
void gwy_gl_material_sample_to_pixbuf (GwyGLMaterial *gl_material
,GdkPixbuf *pixbuf
);
Samples GL material to a provided pixbuf.
void
gwy_gl_material_reset (GwyGLMaterial *gl_material
);
Resets a GL material to default values.
GwyInventory *
gwy_gl_materials (void
);
Gets inventory with all the GL materials.
GwyGLMaterial *
gwy_gl_materials_get_gl_material (const gchar *name
);
Convenience function to get a GL material from gwy_gl_materials()
by name.
#define GWY_GL_MATERIAL_DEFAULT "OpenGL-Default"
The name of the default OpenGL material.
It is guaranteed to always exist.
Note this is not the same as user's default material which corresponds to
the default item in gwy_gl_materials()
inventory and it change over time.
#define GWY_GL_MATERIAL_NONE "None"
The name of special void material with all characteristics zero.
It is guaranteed to exist, but you should rarely actually need it.
struct GwyGLMaterial;
The GwyGLMaterial struct contains private data only and should be accessed using the functions below.
struct GwyGLMaterialClass { };
GwyGLMaterialClass does not contain any public members.
Gwy3DView -- 3D data display widget, GwyRGBA -- representation of color components, GwyInventory -- the container holding all GL materials