DI-Guy SDK Documentation  13.7.1
diguyDx11GraphicsMaterial Class Reference

#include <diguyDx11GraphicsMaterial.h>

Inheritance diagram for diguyDx11GraphicsMaterial:
diguyGraphicsMaterial

Public Member Functions

 diguyDx11GraphicsMaterial (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...
 
virtual void bind_now ()
 This function will be called by DI-Guy when the material should be made active, or bound. More...
 
- Public Member Functions inherited from diguyGraphicsMaterial
bdiGeometryMtlget_scripted_object ()
 
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...
 

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

diguyDx11GraphicsMaterial::diguyDx11GraphicsMaterial ( void *  internal_data)

4 Header files and forward declarations

Member Function Documentation

void diguyDx11GraphicsMaterial::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 diguyDx11GraphicsMaterial::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.

void diguyDx11GraphicsMaterial::bind_now ( )
virtual

This function will be called by DI-Guy when the material should be made active, or bound.

Note that this material should be checked against the material returned by get_last_bound_material(). If they're the same this function should return early.

Immediate Mode:

Immediate mode renderers usually do override this function, to invoke the object created by build(), or make calls to the renderer to set appropriate material state.

Scene Graph:

Scene graph renderers usually do not override this function.

Callable From:

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

Reimplemented from diguyGraphicsMaterial.


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