![]() |
DI-Guy SDK Documentation
13.2
|
Materials modify the color and lighting characteristics of meshes. More...
#include <diguyOsgGraphicsMaterial.h>
Public Member Functions | |
| diguyOsgGraphicsMaterial (void *internal_data) | |
| virtual void | build () |
| This function will be called by DI-Guy when it is time for a renderer-specific material object to be created. More... | |
| virtual void | unbuild () |
| This function will be called by DI-Guy when it is time for a renderer-specific material object to be destroyed. More... | |
| osg::Material * | get_material () |
Public Member Functions inherited from diguyGraphicsMaterial | |
| virtual void | bind_now () |
| This function will be called by DI-Guy when the material should be made active, or bound. More... | |
| const char * | get_name () |
| Returns the name of the texture. More... | |
| void | get_ambient (float *rgba) const |
| This function returns the red, green, blue, and alpha components of the material's ambient setting. More... | |
| void | get_diffuse (float *rgba) const |
| This function returns the red, green, blue, and alpha components of the material's diffuse setting. More... | |
| void | get_specular (float *rgba) const |
| This function returns the red, green, blue, and alpha components of the material's specular setting. More... | |
| void | get_emission (float *rgba) const |
| This function returns the red, green, blue, and alpha components of the material's emission setting. More... | |
| void | get_shininess (float *s) const |
| This function returns the material's shininess setting. More... | |
| int | get_contains_alpha_component () |
| This function returns whether the material contains an alpha component. More... | |
| bdiGeometryMtl * | get_scripted_object () |
Protected Attributes | |
| osg::ref_ptr< osg::Material > | m_material |
Additional Inherited Members | |
Static Public Member Functions inherited from diguyGraphicsMaterial | |
| static diguyGraphicsMaterial * | get_last_bound_material () |
| This function returns the last material that was bound. More... | |
| static void | clear_last_bound_material () |
| This function clears out the last bound material pointer. More... | |
Protected Member Functions inherited from diguyGraphicsMaterial | |
| diguyGraphicsMaterial (void *internal_data) | |
| A protected constructor. More... | |
| virtual | ~diguyGraphicsMaterial () |
| A protected destructor. More... | |
Materials modify the color and lighting characteristics of meshes.
They work in concert with textures to determine the final appearance of visible geometry.
The class diguyOsgGraphicsMaterial is an example of a diguyGraphicsMaterial subclass for an ** graph renderer* using the DI-Guy Loader. The example subclass shows how to use the accessors of the diguyGraphicsMaterial class and which virtual functions should be overridden for an scene graph renderer such as Open Scene Graph.
| diguyOsgGraphicsMaterial::diguyOsgGraphicsMaterial | ( | void * | internal_data | ) |
|
virtual |
This function will be called by DI-Guy when it is time for a renderer-specific material object to be created.
At that point all material information has been read and is available via the Accessor Functions above.
Immediate Mode:
Immediate mode renderers may override this function, to create an object that may be invoked by bind_now() to set material attributes.
Scene Graph:
Scene graph renderers usually do override this function, to create a material object that will be associated with diguyGraphicsMesh objects.
Callable From:
Reimplemented from diguyGraphicsMaterial.
|
virtual |
This function will be called by DI-Guy when it is time for a renderer-specific material object to be destroyed.
Immediate Mode:
Immediate mode renderers may override this function, to destroy any object that may have been created by build().
Scene Graph:
Scene graph renderers usually do override this function, to destroy any object that may have been created by build().
Callable From:
Reimplemented from diguyGraphicsMaterial.
|
inline |
|
protected |