#include <CMaterialBank.h>
Collaboration diagram for CMaterialBank:

Public Types | |
| enum | MATERIALBANK_MATERIALS { DEFAULT_MATERIAL, MENU_UNAVAILABLE, MENU_NORMAL, MENU_OUTSIDE, MENU_INSIDE } |
Public Member Functions | |
| CMaterialBank (void) | |
| ~CMaterialBank (void) | |
| void | GLSetMaterial (const GL_MATERIAL *pMaterial) |
| bool | SetMaterial (int iMaterial) |
| bool | GetMaterial (int iMaterial, GL_MATERIAL *pMaterial) |
| void | AddCustomMaterial (GL_MATERIAL *pMaterial) |
| bool | SetCustomMaterial (int iMaterial) |
| bool | GetCustomMaterial (int iMaterial, GL_MATERIAL *pMaterial) |
A simple materials class with default materials for menus and methods for managing custom materials. Uses OpenGL calls to set materials. Use SetMaterial() and SetCustomMaterial() to set class-managed materials with OpenGL and GLSetMaterial() to set materials when providing a material you do not want "managed" by the materials class.
Definition at line 95 of file CMaterialBank.h.
|
|
|
|
|
Constructor, inititalise custom materials vector. Definition at line 104 of file CMaterialBank.cpp. |
|
|
Destructor, remove custom materials vector. Definition at line 115 of file CMaterialBank.cpp. |
|
|
Add a custom material to our custom material array.
|
|
||||||||||||
|
Get the custom material at the passed index and put it at pMaterial.
|
|
||||||||||||
|
Get the default material at the passed index and put it at pMaterial.
|
|
|
Sets the passed material with OpenGL. Can also be used to set a material that is not "registered" by the CMaterialBank object.
References GL_MATERIAL::Ambient, GL_MATERIAL::Diffuse, GL_MATERIAL::Shininess, and GL_MATERIAL::Specular. Referenced by SetCustomMaterial(), and SetMaterial(). |
|
|
Sets the passed custom material number. Performs some range checking before setting material, if material is not in range then the default (white) material is set.
References GLSetMaterial(). Here is the call graph for this function: ![]() |
|
|
Sets the passed default material number. Performs some range checking before setting material, if material is not in range then the default (white) material is set.
References GLSetMaterial(). Here is the call graph for this function: ![]() |
1.3.8