[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ] [ Search: ]

C.6.7 Texture and Material Related Changes

Texture and Material Preparation

Texture and material preparation is now fully automatic. It is no longer necessary to prepare a texture or a material before you can use it. It is sufficient simply to register the texture or material. This means that the following functions have been removed (and you can just remove invocations of them from your applications if you used them):

Material Registration

Registering an ‘iMaterialWrapper’ with the texture manager is no longer necessary; any such calls can be removed.

Procedural Texture Relocation

Implementations of the standard procedural textures (dots, fire, plasma, etc.) now reside directly in the ‘stdpt’ plugin (‘CS/plugins/proctex/standard’), rather than in the ‘cstool’ module. Consequently, the following previously public headers are no longer available:

Likewise, procedural textures can no longer be allocated directly (for instance, via ‘new csProcFire’). Instead, you must now use the plugin system to create such textures. For example:

csRef<iTextureType> type = csLoadPluginCheck<iTextureType> (object_reg,
if (!type) return false;	// Error
csRef<iTextureFactory> fireFact = type->NewFactory();
csRef<iTextureWrapper> tex = fireFact->Generate();
csRef<iFireTexture> fire = scfQueryInterface<iFireTexture> (tex);

Various procedural textures may or may not implement their own custom SCF interfaces beyond the normal interfaces implemented by all procedural textures. In the example above, the “fire” texture implements the specialized ‘iFireTexture’.

This document was generated using texi2html 1.76.