ofDocsdocumentation types ofBaseMaterial

ofBaseMaterial


begin( )

void begin()

begin using this material's properties


end( )

void end()

end using this material's properties


getAmbientColor( )

ofFloatColor getAmbientColor()

\return the ambient reflectance


getDiffuseColor( )

ofFloatColor getDiffuseColor()

\return the diffuse reflectance


getEmissiveColor( )

ofFloatColor getEmissiveColor()

\return the emitted light intensity


getShader( ... )

const ofShader & getShader(int textureTarget, bool geometryHasColor, ofGLProgrammableRenderer &renderer)

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( )

float getShininess()

\return the specular exponent


getSpecularColor( )

ofFloatColor getSpecularColor()

\return the specular reflectance


updateLights( ... )

void updateLights(const ofShader &shader, ofGLProgrammableRenderer &renderer)

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( ... )

void updateMaterial(const ofShader &shader, ofGLProgrammableRenderer &renderer)

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


uploadMatrices( ... )

void uploadMatrices(const ofShader &shader, ofGLProgrammableRenderer &renderer)

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


~ofBaseMaterial( )

~ofBaseMaterial()