Game Development Reference
In-Depth Information
{
name "default"
}
CIwResTemplateMTL
{
name "clamped_unfiltered"
clampUV true
filtering false
}
Once a resource template has been defined, it can be invoked from within a GROUP
file by using the useTemplate parameter. This parameter takes the type and name of
a resource template, searches for it and, if found, applies any settings defined in the
template to any resource of the type that is loaded from then on. Here's an example:
CIwResGroup
{
name "images"
useTemplate "image" "rgba4444_nomipmap"
useTemplate "mtl" "clamped_unfiltered"
"./materials.mtl"
useTemplate "image" "default"
useTemplate "mtl" "default"
}
Defining material templates
A material resource template is declared by an instance of the CIwResTemplateMTL
class and is used to provide a starting configuration for all instances of CIwMaterial
that are created while the template is in use.
We can specify any parameter in a material template that can be applied to a
CIwMaterial instance when processed from an ITX file. In the following table,
a few of the more useful ones for template purposes are listed, but for a complete
list take a look at the Marmalade documentation for CIwMaterial :
 
Search WWH ::




Custom Search