MaterialContent.SetTexture Method

Bb198876.note(en-US,XNAGameStudio.30).gifNote
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.

Namespace: Microsoft.Xna.Framework.Content.Pipeline.Graphics
Assembly: Microsoft.Xna.Framework.Content.Pipeline (in microsoft.xna.framework.content.pipeline.dll)

protected void SetTexture (
         string key,
         ExternalReference<TextureContent> value
)

Parameters

key
Name of the key being modified.
value
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.

Windows XP SP2, Windows Vista

Community Additions

ADD
Show: