Class Material

Base class for materials.

A material describes the appearance of an object. (Inherited from UniformList)

See also:

Fields

Material.name Material name.
Material.shader The shader object that is bound to the material.
Material.depth_test Depth test flag.
Material.depth_func Depth comparison func (mode) used for depth testing.
Material.wireframe Sets whether wireframe lines will be used when drawing.
Material.mesh_cull_mode Sets whether back-facing triangles in a Mesh are culled.
Material.main_texture The texture to be used in mesh:setTexture().

Methods

Material:init (name[, shader=Material.default_shader]) The public constructor.


Fields

Material.name
Material name.
  • name
Material.shader
The shader object that is bound to the material. (default_shader by default)
  • shader
Material.depth_test
Depth test flag. (Enabled by default)
  • depth_test
Material.depth_func
Depth comparison func (mode) used for depth testing.
  • depth_func
Material.wireframe
Sets whether wireframe lines will be used when drawing.
  • wireframe
Material.mesh_cull_mode
Sets whether back-facing triangles in a Mesh are culled.
  • mesh_cull_mode
Material.main_texture
The texture to be used in mesh:setTexture(). (uniform Image MainTex) in shader.
  • main_texture

Methods

Material:init (name[, shader=Material.default_shader])
The public constructor.

Parameters:

  • name string Name of the material.
  • shader LOVE Shader (default Material.default_shader)
generated by LDoc 1.4.6 Last updated 2023-03-21 17:41:24