EffectCompiler.FromFile(String,Include,ShaderFlags) Method (Microsoft.DirectX.Direct3D)

Creates an effect compiler from an ASCII or binary effect description.

Definition

Visual Basic Public Shared Function FromFile( _
    ByVal sourceFile As String, _
    ByVal includeFile As Include, _
    ByVal flags As ShaderFlags _
) As EffectCompiler
C# public static EffectCompiler FromFile(
    string sourceFile,
    Include includeFile,
    ShaderFlags flags
);
C++ public:
static EffectCompilerFromFile(
    StringLeave SitesourceFile,
    IncludeincludeFile,
    ShaderFlags flags
);
JScript public static function FromFile(
    sourceFile : String,
    includeFile : Include,
    flags : ShaderFlags
) : EffectCompiler;

Parameters

sourceFile System.String
String that indicates the file name.
includeFile Microsoft.DirectX.Direct3D.Include
Optional Include object to use for handling #include directives. If this value is null, #include directives are either honored when compiling from a file, or cause an error when compiled from a resource or memory.
flags Microsoft.DirectX.Direct3D.ShaderFlags
One or more compile options identified by the ShaderFlags enumeration.

Return Value

Microsoft.DirectX.Direct3D.EffectCompiler
An EffectCompiler that represents the effect compiler.

Remarks

Exceptions

InvalidCallException

The method call is invalid. For example, a method's parameter might contain an invalid value.

InvalidDataException

The data is invalid.

OutOfMemoryExceptionLeave Site

Microsoft Direct3D could not allocate sufficient memory to complete the call.

See Also