Material

Inherited: Resource

Description

Public Methods

int

blendMode () const

MaterialInstance *

createInstance (Material::SurfaceType type = SurfaceType::Static)

bool

depthTest () const

bool

depthWrite () const

bool

doubleSided () const

int

lightModel () const

int

materialType () const

void

setBlendMode (int mode)

void

setDepthTest (bool test)

void

setDepthWrite (bool depth)

void

setDoubleSided (bool flag)

void

setLightModel (int model)

void

setMaterialType (int type)

void

setTexture (const std::string & name, Texture * texture)

void

setWireframe (bool wireframe)

bool

wireframe () const

Static Methods

None

Methods Description

int Material::blendMode () const

Returns current blend mode for the material. For more detalse please refer to Material::BlendType enum.

See also setBlendMode().


MaterialInstance type = SurfaceType::Static)

Returns a new instance for the material with the provided surface type.


bool Material::depthTest () const

Returns true if depth test was enabled; otherwise returns false.

See also setDepthTest().


bool Material::depthWrite () const

Returns true if write opertaion to the depth buffer was enabled; otherwise returns false.

See also setDepthWrite().


bool Material::doubleSided () const

Returns true if mas marked as double-sided; otherwise returns false.

See also setDoubleSided().


int Material::lightModel () const

Returns current light model for the material. For more detalse please refer to Material::LightModelType enum.

See also setLightModel().


int Material::materialType () const

Returns current material type. For more detalse please refer to Material::MaterialType enum.

See also setMaterialType().


void Material::setBlendMode (int mode)

Sets a new blend mode for the material. For more detalse please refer to Material::BlendType enum.

See also blendMode().


void Material::setDepthTest (bool test)

Enables or disables a depth test for the material.

See also depthTest().


void Material::setDepthWrite (bool depth)

Enables or disables depth write operation to the depth buffer.

See also *depth*Write().


void Material::setDoubleSided (bool flag)

Enables or disables the double-sided flag for the material.

See also doubleSided().


void Material::setLightModel (int model)

Sets a new light model for the material. For more detalse please refer to Material::LightModelType enum.

See also lightModel().


void Material::setMaterialType (int type)

Sets new material type. For more detalse please refer to Material::MaterialType enum.

See also materialType().


void Material::setTexture (std::string & name, Texture * texture)

Sets a texture with a given name for the material.


void Material::setWireframe (bool wireframe)

Enables or disables a wireframe mode for the material.

See also *wireframe*().


bool Material::wireframe () const

Returns true if material must be rendered as wireframe.

See also setWireframe().