material

vgl. material

new material() → {vgl.material}

Description:
  • Create a new instance of class material.

Source:
Returns:
Type
vgl.material

Methods

addAttribute(attr) → {boolean}

Description:
  • Add a new attribute to the material.

Source:
Parameters:
Name Type Description
attr vgl.materialAttribute
Returns:
Type
boolean

binNumber() → {number}

Description:
  • Return bin number for the material.

Source:
Default Value:
  • 100
Returns:
Type
number

bind(renderState)

Description:
  • Bind and activate material states.

Source:
Parameters:
Name Type Description
renderState vgl.renderState

bindVertexData(renderState, key)

Description:
  • Bind vertex data.

Source:
Parameters:
Name Type Description
renderState vgl.renderState
key string

exists(attr) → {boolean}

Description:
  • Check if incoming attribute already exists in the material.

Source:
Parameters:
Name Type Description
attr vgl.materialAttribute
Returns:
Type
boolean

setBinNumber(binNo)

Description:
  • Set bin number for the material.

Source:
Parameters:
Name Type Description
binNo number

shaderProgram() → {vgl.shaderProgram}

Description:
  • Return shader program used by the material.

Source:
Returns:
Type
vgl.shaderProgram

undoBind(renderState)

Description:
  • Undo-bind and de-activate material states.

Source:
Parameters:
Name Type Description
renderState vgl.renderState

undoBindVertexData(renderState, key)

Description:
  • Undo bind vertex data.

Source:
Parameters:
Name Type Description
renderState vgl.renderState
key string