BRender Tutorial Guide:6 Texture Mapping:Loading the Material
Next|Prev|Up

Loading the Material


The following code loads a material description from the material script file 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.


Generated with CERN WebMaker