createMaterial Method

Create a RenderMaterial from parameters If the parameters include a non-empty key, and no previously-created material already exists with that key, the newly-created material will be cached on the IModelConnection such that it can later be retrieved by the same key using RenderSystem.findMaterial.

createMaterial(_params: Params, _imodel: IModelConnection): RenderMaterial | undefined

Parameter Type Description
_params Params A description of the material's properties.
_imodel IModelConnection The IModelConnection associated with the material.

Returns - RenderMaterial | undefined

the newly-created material, or undefined if the material could not be created or if a material with the same key as that specified in the params already exists.

Defined in

Last Updated: 13 June, 2024