Struct kiss3d::resource::MaterialManager [] [src]

pub struct MaterialManager { /* fields omitted */ }

The material manager.

Upon construction, it contains: * the object material, used as the default to render objects. * the normals material, used do display an object normals.

It keeps a cache of already-loaded materials. Note that this is only a cache, nothing more. Thus, its usage is not required to load materials.


impl MaterialManager

Creates a new material manager.

Mutably applies a function to the material manager.

Gets the default material to draw objects.

Get a material with the specified name. Returns None if the material is not registered.

Adds a material with the specified name to this cache.

Removes a mesh from this cache.