br_material_find_cbfn
BrMaterialFindHook()
163
, to be called when BrMaterialFind()
162
or BrMaterialFindMany()
162
fail to find any material.
typedef
fwproto.h
for a precise declaration)
br_material* br_material_find_cbfn(const char*) Find (when
BrMaterialFind()
fails)
Specification
Description:
An application defined call-back function used when CBFnMaterialFind()
BrMaterialFind()
162 or
BrMaterialFindMany()
162 fail.
Declaration:
br_material* BR_CALLBACK CBFnMaterialFind(const char* name)
Arguments:
const char * name
The search pattern supplied to BrMaterialFind()
162 or
BrMaterialFindMany()
162 that did not match any material.
Preconditions: BRender has completed initialisation. No material has an identifier that successfully matches the search pattern.
Effects: Application defined.
Result:
br_material *
Either return an existing material that is deemed appropriate for the search pattern, or Null
if there isn't one. This value will be returned by BrMaterialFind()
162 or
BrMaterialFindMany()
162.
Remarks: This could either be used to supply a default material or to create a material. If materials were created on demand, then this function could search another list of available materials (but not yet created) and see if the pattern matched any of them, if it did, one of them could be registered and returned. Note that there is no way to supply more than one material.
See Also:
BrMaterialFind()
162
, BrMaterialFindMany()
162
, BrMaterialFindHook()
163
, BrMaterialFindFailedLoad()
164
.