![]() |
Public API Reference |
![]() |
Tools related to creating materials. More...
#include <cstool/materialbuilder.h>
Static Public Member Functions | |
static iMaterialWrapper * | CreateColorMaterial (iObjectRegistry *object_reg, const char *matname, csColor color) |
Create a material from a color. | |
static iMaterialWrapper * | CreateParallaxMaterial (iObjectRegistry *object_reg, const char *matname, const char *matfile, const char *normalfile, const char *heightfile, const csVector4 &specular) |
Load a material, a normalmap texture, and a heightmap texture and setup a parallax material from that. | |
static void | SetupParallaxMaterial (iObjectRegistry *object_reg, iMaterialWrapper *material, iTextureHandle *normalmap, iTextureHandle *heightmap, const csVector4 &specular) |
Set up an already loaded material for parallax mapping with previously loaded normalmap and heightmap textures. |
Tools related to creating materials.
Definition at line 42 of file materialbuilder.h.
static iMaterialWrapper* CS::Material::MaterialBuilder::CreateColorMaterial | ( | iObjectRegistry * | object_reg, |
const char * | matname, | ||
csColor | color | ||
) | [static] |
Create a material from a color.
The material will be composed of a single texture with size 1x1 pixel of the given color. If there is already a material in the engine with the given 'matname' then the material will not be loaded again.
static iMaterialWrapper* CS::Material::MaterialBuilder::CreateParallaxMaterial | ( | iObjectRegistry * | object_reg, |
const char * | matname, | ||
const char * | matfile, | ||
const char * | normalfile, | ||
const char * | heightfile, | ||
const csVector4 & | specular | ||
) | [static] |
Load a material, a normalmap texture, and a heightmap texture and setup a parallax material from that.
Returns 0 if the material could not be created. If there is already a material in the engine with the given 'matname' then the material will not be loaded again.
static void CS::Material::MaterialBuilder::SetupParallaxMaterial | ( | iObjectRegistry * | object_reg, |
iMaterialWrapper * | material, | ||
iTextureHandle * | normalmap, | ||
iTextureHandle * | heightmap, | ||
const csVector4 & | specular | ||
) | [static] |
Set up an already loaded material for parallax mapping with previously loaded normalmap and heightmap textures.