MaterialContent.SetTexture Method (Microsoft.Xna.Framework.Content.Pipeline.Graphics)
Sets a value in the contained TextureReferenceDictionary object.
If null is passed, the value is removed.
Namespace: Microsoft.Xna.Framework.Content.Pipeline.Graphics
Assembly: MonoGame.Framework.Content.Pipeline (MonoGame.Framework.Content.Pipeline.dll 3.8.0.1082)
Assembly: MonoGame.Framework.Content.Pipeline (MonoGame.Framework.Content.Pipeline.dll 3.8.0.1082)
- C#
- VB
- F#
protected void SetTexture( string key, ExternalReference<TextureContent> value )
Syntax for VB is not yet implemented.
Syntax for F# is not yet implemented.
Parameters
- key
-
Type: System.String
Name of the key being modified.
- value
-
Type: ExternalReference<TextureContent>
Value being set.
The key value differs depending on the type of attached dictionary.
If attached to a BasicMaterialContent dictionary (which becomes a BasicEffect object at run time), the value for the Texture key is used as the texture for the BasicEffect runtime object. Other keys are ignored.
If attached to a EffectMaterialContent dictionary, key names are the texture names used by the effect. These names are dependent upon the author of the effect object.
Supported in:
Windows DirectX Desktop
Linux Desktop
Windows DirectX Desktop
Linux Desktop