earth.mat
and adds it to the registry:
planet_material = BrFmtScriptMaterialLoad("earth.mat"); BrMaterialAdd(planet_material);Note that the same result could have been achieved using the following code:
BrMaterialAdd(BrFmtScriptMaterialLoad("earth.mat"));Storing a pointer to the loaded material in
planet_material
allows the programmer to dynamically access fields in the structure.