Axiom.Graphics.CompositorInstance.GetTextureInstance C# (CSharp) Method

GetTextureInstance() public method

Get the instance for a local texture.
It is only valid to call this when local textures have been loaded, which in practice means that the compositor instance is active. Calling it at other times will cause an exception. Note that since textures are cleaned up aggressively, this name is not guaranteed to stay the same if you disable and renable the compositor instance.
public GetTextureInstance ( string name ) : Axiom.Core.Texture
name string The name of the texture in the original compositor definition
return Axiom.Core.Texture
		public Texture GetTextureInstance( string name )
		{
			return GetTextureInstance( name, 0 );
		}

Same methods

CompositorInstance::GetTextureInstance ( string name, int mrtIndex ) : Axiom.Core.Texture

Usage Example

Example #1
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="instance"></param>
 /// <param name="texture"></param>
 /// <returns></returns>
 private bool IsInputToOutputTarget( CompositorInstance instance, Texture texture )
 {
     var tp = instance.Technique.OutputTarget;
     foreach ( var p in tp.Passes )
     {
         for ( var i = 0; i < p.Inputs.Length; i++ )
         {
             var t = instance.GetTextureInstance( p.GetInput( i ).Name, 0 );
             if ( t != null && t == texture )
             {
                 return true;
             }
         }
     }
     return false;
 }
All Usage Examples Of Axiom.Graphics.CompositorInstance::GetTextureInstance