DI-Guy SDK Documentation  13.1
diguyOsgGraphicsMaterial Class Reference

#include <diguyOsgGraphicsMaterial.h>

Inheritance diagram for diguyOsgGraphicsMaterial:
diguyGraphicsMaterial

Public Member Functions

 diguyOsgGraphicsMaterial (void *internal_data)
 4 Header files and forward declarations More...
 
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)
 This function returns the red, green, blue, and alpha components of the material's ambient setting. More...
 
void get_diffuse (float *rgba)
 This function returns the red, green, blue, and alpha components of the material's diffuse setting. More...
 
void get_specular (float *rgba)
 This function returns the red, green, blue, and alpha components of the material's specular setting. More...
 
void get_emission (float *rgba)
 This function returns the red, green, blue, and alpha components of the material's emission setting. More...
 
void get_shininess (float *s)
 This function returns the material's shininess setting. More...
 
void free_loader_memory ()
 This function frees most memory allocated by the DI-Guy geometry loader for this object. More...
 
int get_contains_alpha_component ()
 This function returns whether the material contains an alpha component. More...
 
bdiGeometryMtlget_scripted_object ()
 

Protected Attributes

osg::ref_ptr< osg::Material > m_material
 

Additional Inherited Members

- Static Public Member Functions inherited from diguyGraphicsMaterial
static diguyGraphicsMaterialget_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...
 

Constructor & Destructor Documentation

diguyOsgGraphicsMaterial::diguyOsgGraphicsMaterial ( void *  internal_data)

4 Header files and forward declarations

Member Function Documentation

void diguyOsgGraphicsMaterial::build ( )
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:

  • N/A (automatically called by DI-Guy Graphics API during the Build Stage)

Reimplemented from diguyGraphicsMaterial.

void diguyOsgGraphicsMaterial::unbuild ( )
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:

  • N/A (automatically called by DI-Guy Graphics API during the Unbuild Stage)

Reimplemented from diguyGraphicsMaterial.

osg::Material* diguyOsgGraphicsMaterial::get_material ( )
inline

Member Data Documentation

osg::ref_ptr<osg::Material> diguyOsgGraphicsMaterial::m_material
protected

The documentation for this class was generated from the following files: