material parameter properties that can be applied to vertices in the OpenGL lighting model used in determining both the intensity and color of reflected light based on the lighting model in use and if the vertices are on a front or back sided face
More...
#include <ofMaterialBaseTypes.h>
material parameter properties that can be applied to vertices in the OpenGL lighting model used in determining both the intensity and color of reflected light based on the lighting model in use and if the vertices are on a front or back sided face
◆ ~ofBaseMaterial()
virtual ofBaseMaterial::~ofBaseMaterial |
( |
| ) |
|
|
inlinevirtual |
◆ begin()
virtual void ofBaseMaterial::begin |
( |
| ) |
const |
|
pure virtual |
begin using this material's properties
Implemented in ofMaterial.
◆ bind()
set to bound. Later used if certain properties are set so the shader can be updated without calling end(), set var and then begin() again.
◆ end()
virtual void ofBaseMaterial::end |
( |
| ) |
const |
|
pure virtual |
end using this material's properties
Implemented in ofMaterial.
◆ getAmbientColor()
virtual ofFloatColor ofBaseMaterial::getAmbientColor |
( |
| ) |
const |
|
pure virtual |
- Returns
- the ambient reflectance
Implemented in ofMaterial.
◆ getDiffuseColor()
virtual ofFloatColor ofBaseMaterial::getDiffuseColor |
( |
| ) |
const |
|
pure virtual |
- Returns
- the diffuse reflectance
Implemented in ofMaterial.
◆ getEmissiveColor()
virtual ofFloatColor ofBaseMaterial::getEmissiveColor |
( |
| ) |
const |
|
pure virtual |
- Returns
- the emitted light intensity
Implemented in ofMaterial.
◆ getShader()
create and return a shader used to implement the materials effect for a given renderer
- Parameters
-
textureTarget | an implementation-specific value to specify the type of shader to use |
renderer | programmable renderer instance to create the material shader for |
◆ getShininess()
virtual float ofBaseMaterial::getShininess |
( |
| ) |
const |
|
pure virtual |
- Returns
- the specular exponent
Implemented in ofMaterial.
◆ getSpecularColor()
virtual ofFloatColor ofBaseMaterial::getSpecularColor |
( |
| ) |
const |
|
pure virtual |
- Returns
- the specular reflectance
Implemented in ofMaterial.
◆ isBound()
bool ofBaseMaterial::isBound |
( |
| ) |
const |
|
virtual |
when begin() is called, the material is set to bound by the renderer.\nSet to unbound via renderer when end() is called.
- Returns
- is the shader bound to a renderer.
◆ setCustomShader()
virtual void ofBaseMaterial::setCustomShader |
( |
std::shared_ptr< ofShader > |
aCustomShader | ) |
|
|
pure virtual |
set a custom shader controlled by the user.
- Parameters
-
aCustomShader | the material shader, created and maintained by the user |
Implemented in ofMaterial.
◆ unbind()
◆ updateEnvironmentMaps()
update the given renderer's environment maps / cube maps to the material shader
- Parameters
-
shader | the material shader, created by getShader() |
renderer | programmable renderer instance that uses the material shader |
◆ updateLights()
update the given renderer's lights to the material shader
- Parameters
-
shader | the material shader, created by getShader() |
renderer | programmable renderer instance that uses the material shader |
◆ updateMaterial()
update the material properties to the material shader
- Parameters
-
shader | the material shader, created by getShader() |
renderer | programmable renderer instance that uses the material shader |
◆ updateShadows()
update the given renderer's shadows to the material shader
- Parameters
-
shader | the material shader, created by getShader() |
renderer | programmable renderer instance that uses the material shader |
◆ uploadMatrices()
upload the given renderer's normal matrix to the material shader
- Parameters
-
shader | the material shader, created by getShader() |
renderer | programmable renderer instance that uses the material shader |
Reimplemented in ofMaterial.
◆ ofGLProgrammableRenderer
◆ mBound
bool ofBaseMaterial::mBound = false |
|
mutableprotected |
The documentation for this class was generated from the following files: