MaterialContent.SetTexture Method
Note
This method is available only when developing for Windows.
Sets a value in the contained TextureReferenceDictionary object.
If null is passed, the value is removed.
Syntax
'Declaration
Protected Sub SetTexture ( _
key As String, _
value As ExternalReference(Of TextureContent) _
)
protected void SetTexture (
string key,
ExternalReference<TextureContent> value
)
protected:
void SetTexture(
String key,
ExternalReference<TextureContent> value
)
Parameters
- key
Type: String
Name of the key being modified. - value
Type: ExternalReference<TextureContent>
Value being set.
Remarks
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.
Requirements
Namespace: Microsoft.Xna.Framework.Content.Pipeline.Graphics
Assembly: Microsoft.Xna.Framework.Content.Pipeline (in microsoft.xna.framework.content.pipeline.dll)
See Also
Reference
MaterialContent Class
MaterialContent Members
Texture
Microsoft.Xna.Framework.Content.Pipeline.Graphics Namespace
Platforms
Windows 7, Windows Vista, Windows XP