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

Loading the Texture Map


Texture maps must be loaded (or created) and registered, before they can be used in rendering:

	BrMapAdd(BrPixelmapLoad("earth15.pix"));
The file earth15.pix stores a texture map depicting the Earth's surface. BrPixelmapLoad loads a .pix file and returns a pointer to br_pixelmap. BrMapAdd adds a texture to the registry. Note that textures, like materials, are stored in the registry by name. When you want to use a registered texture, you can refer to it by name. The texture loaded from earth15.pix is called, logically enough, `earth'. It is assigned in the material script file earth.mat.


Generated with CERN WebMaker