Parameterized Processors
Describes how parameterized processors work in XNA Game Studio. Many of the standard Content Pipeline content processors shipped with XNA Game Studio support parameter usage. Parameterization makes any standard or custom processor more flexible and better able to meet the needs of your XNA Framework application. In addition to specifying values for standard parameters, you can easily implement parameter support for a new or an existing custom processor. For more information, see Developing with Parameterized Processors.
When you select a game asset, the Properties window displays the parameters for the related asset processor. Use the Properties window at any time to modify these parameter values.
Note
If you change the processor for a game asset to a different processor, all parameter values are reset to their default values. This means that if you modify the Generate Mipmaps parameter value for the TextureProcessor and then switch to a different processor (for example, FontTextureProcessor Class), the parameters switch to the default values for that processor. If you then swith back again, the modified values are reset to the default values of the original processor. The values do not revert to the modified values you set originally.
Standard Parameterized Processors
The following describes only standard processors that accept parameters, the parameter types, and their default value. For more information about all standard processors, see Standard Importers and Processors.
Friendly name | Type name | Input type | Output type | Description |
---|---|---|---|---|
Model | ModelProcessor | NodeContent Class | ModelContent Class | A parameterized processor that outputs models as a ModelContent Class object. Available parameters:
|
Sprite Font Texture | FontTextureProcessor | TextureContent Class | SpriteFontContent | A parameterized processor that outputs a sprite font texture as a SpriteFontContent object. Available parameters:
|
Texture | TextureProcessor | TextureContent Class | TextureContent Class | A parameterized processor that outputs textures as a TextureContent Class object. Available parameters:
|
Texture Processing with XNA Game Studio
In XNA Game Studio 2.0 or earlier, the following standard processors were used for texture processing.
- TextureProcessor
- ModelTextureProcessor
- SpriteTextureProcessor
In XNA Game Studio, the Texture - XNA Framework processor replaces the functionality of this entire group. For new XNA Game Studio projects and for projects converted by the Project Upgrade Wizard for XNA Game Studio 2.0, the correct processor is selected automatically. For existing custom processors that make calls to any processor from the list above, however, the code must be modified to use the new TextureProcessor with the proper parameters. The following describes the parameter values required for emulating each previous texture processor.
Processor type name | Required parameters and values |
---|---|
TextureProcessor | Call the Texture (TextureProcessor) with the following parameter values: |
ModelTextureProcessor | Call the Texture (TextureProcessor) with the following parameter values:
|
SpriteTextureProcessor | Call the Texture (TextureProcessor) with the following parameter values: |
For more information about modifying and declaring parameter values programmatically, see Developing with Parameterized Processors.