Share via


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

Creates an effect compiler from an ASCII or binary effect description in a string.

Definition

Visual Basic Public Shared Function FromString( _
    ByVal sourceData As String, _
    ByVal includeFile As Include, _
    ByVal flags As ShaderFlags, _
    ByRef compilationErrors As String _
) As EffectCompiler
C# public static EffectCompiler FromString(
    string sourceData,
    Include includeFile,
    ShaderFlags flags,
    out string compilationErrors
);
C++ public:
static EffectCompilerFromString(
    StringLeave SitesourceData,
    IncludeincludeFile,
    ShaderFlags flags,
    [Out] StringLeave Site^% compilationErrors
);
JScript public static function FromString(
    sourceData : String,
    includeFile : Include,
    flags : ShaderFlags,
    compilationErrors : String
) : EffectCompiler;

Parameters

sourceData System.String
A StringLeave Site that describes the EffectCompiler to create.
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.
compilationErrors System.String
String that contains a listing of compilation errors.

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