Syntax

dbSetEffectOn(ObjectID, FXFilename.s, TextureFlag)

Description

This command will load and apply an FX file to an object. If the object does not exist onto which an effect is set, a default model is created either specified by the FX file or if none is specified, an internal pyramid model. The FX filename must point to an FX file that is compatible with the DX9 effect framework and typically uses the extension '.fx'. If the TextureFlag parameter is set to 0, the effect will use the textures already mapped to the model, and a value of 1 will discard the current textures and load the textures specified in the FX file. Typically, effects rely on the specified model and textures in the FX file to function properly. Be aware that if you want the X file specified in the effect to load automatically, that X file must be completely compatible with the latest DirectX 9.0c loader, otherwise the model will not be used. The DirectX mesh loader differs from the DBPro object loader, in that the DBP loader can parse and handle more variants of X file.

See Also

dbSetAlphaMappingOn, dbSetBlendMappingOn, dbSetBumpMappingOn, dbSetCartoonMappingOn, dbSetCubeMappingOn, dbSetDetailMappingOn, dbSetLightMappingOn, dbSetRainbowShadingOn, dbSetReflectionShadingOndbSetShadingOff, dbSetShadowShadingOn, dbSetSphereMappingOn