-
Notifications
You must be signed in to change notification settings - Fork 26
Material
Alessandro Febretti edited this page Jun 12, 2013
·
24 revisions
[[module cyclops]]
extends[[Uniforms]]
Contains visual properties for an entity. Visual properties set through a material are applied after an effect definition, and override properties specified in the effect. See the effect and material reference page for more information.
Method(s) | Description |
---|---|
Material create() static
|
creates a new material object |
setColor(Color diffuse, Color emissive) |
Sets the diffuse and emissive colors for this material. After calling setColor , the passed colors will override any color definition specified in the entity effect. |
reset() |
Resets all material properties to their default values. Colors and transparency will switch back to their default values (that is, whatever is specified in the entity effect. Uniforms attached to the material will not be deleted by this call. To delete uniforms, call removeAllUniforms . |
parse(string definiton) |
|
setAlpha(bool value) , getAlpha()
|
Sets or gets the material alpha value. setAlpha only sets the value of the unif_Alpha uniform. By default, cyclops shaders use this uniform to modulate fragment alpha values after lighting (see postLightingSection/default.frag ). This behavior can be modified by the user, redefining the @postLightingSection shader macro. |
setPolygonOffset(float factor, float units) |
|
setShininess(float value) , float getShininess()
|
|
setGloss(float value) , float getGloss()
|
|
Flags | |
setTransparent(bool value) isTransparent()
|
Sets or gets the transparent flag for this entity. setTransparent overrides a transparency flag specified in the entity effect. |
setWireframe(bool value) , isWireframe()
|
|
setDoubleFace(bool value) , isDoubleFace()
|
|
setAdditive(bool value) , isAdditive()
|
|
setDepthTestEnabled(bool value) , isDepthTestEnabled()
|
|
Textures | |
setDiffuseTexture(String texture) , String getDiffuseTexture()
|
|
setNormalTexture(String texture) , String getNormalTexture()
|