ofDocsdocumentation gl ofMaterial

ofMaterial


begin( )

void begin()

end( )

void end()

getAmbientColor( )

ofFloatColor getAmbientColor()

getDiffuseColor( )

ofFloatColor getDiffuseColor()

getEmissiveColor( )

ofFloatColor getEmissiveColor()

getSettings( )

ofMaterialSettings getSettings()

getShader( ... )

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

getShininess( )

float getShininess()

getSpecularColor( )

ofFloatColor getSpecularColor()

initShaders( ... )

void initShaders(ofGLProgrammableRenderer &renderer)

ofMaterial( )

ofMaterial()

setAmbientColor( ... )

void setAmbientColor(ofFloatColor oAmbient)

set the ambient reflectance

Parameters:

oAmbient the ambient reflectance


setColors( ... )

void setColors(ofFloatColor oDiffuse, ofFloatColor oAmbient, ofFloatColor oSpecular, ofFloatColor emissive)

set all material colors: reflectance type & light intensity

Parameters:

oDiffuse the diffuse reflectance

oAmbient the ambient reflectance

oSpecular the specular reflectance

oEmmissive the emitted light intensity


setCustomUniform1f( ... )

void setCustomUniform1f(const string &name, float value)

setCustomUniform1i( ... )

void setCustomUniform1i(const string &name, int value)

setCustomUniform2f( ... )

void setCustomUniform2f(const string &name, glm::vec2 value)

setCustomUniform3f( ... )

void setCustomUniform3f(const string &name, glm::vec3 value)

setCustomUniform4f( ... )

void setCustomUniform4f(const string &name, glm::vec4 value)

setCustomUniformMatrix3f( ... )

void setCustomUniformMatrix3f(const string &name, glm::mat3 value)

setCustomUniformMatrix4f( ... )

void setCustomUniformMatrix4f(const string &name, glm::mat4 value)

setCustomUniformTexture( ... )

void setCustomUniformTexture(const string &name, const ofTexture &value, int textureLocation)

setCustomUniformTexture( ... )

void setCustomUniformTexture(const string &name, int textureTarget, GLint textureID, int textureLocation)

setDiffuseColor( ... )

void setDiffuseColor(ofFloatColor oDiffuse)

set the diffuse reflectance

Parameters:

oDiffuse the diffuse reflectance


setEmissiveColor( ... )

void setEmissiveColor(ofFloatColor oEmmisive)

set the emitted light intensity

Parameters:

oEmmissive the emitted light intensity


setShininess( ... )

void setShininess(float nShininess)

set the specular exponent


setSpecularColor( ... )

void setSpecularColor(ofFloatColor oSpecular)

set the specular reflectance

Parameters:

oSpecular the specular reflectance


setup( ... )

void setup(const ofMaterialSettings &settings)

setup using settings struct

Parameters:

settings color & other properties struct


updateLights( ... )

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

updateMaterial( ... )

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

~ofMaterial( )

~ofMaterial()