Microsoft DirectX 9.0 SDK Update (October 2004)

Effect.FromStream Method

Language:

Note: This documentation is preliminary and is subject to change.

Creates an effect from an ASCII or binary effect description.

Definition

Visual Basic .NET Public Shared Function FromStream( _
    ByVal device As Device, _
    ByVal data As Stream, _
    ByVal preprocessorDefines() As Macro, _
    ByVal includeFile As Include, _
    ByVal flags As ShaderFlags, _
    ByVal pool As EffectPool, _
    ByRef compilationErrors As String _
) As Effect
C# public static Effect FromStream(
    Device device,
    Stream data,
    Macro[] preprocessorDefines,
    Include includeFile,
    ShaderFlags flags,
    EffectPool pool,
    out string compilationErrors
);
Managed C++ public: static Effect* FromStream(
    Device *device,
    Stream *data,
    Macro preprocessorDefines __gc[],
    Include *includeFile,
    ShaderFlags flags,
    EffectPool *pool,
    String **compilationErrors
);
JScript .NET public static function FromStream(
    device : Device,
    data : Stream,
    preprocessorDefines : Macro[],
    includeFile : Include,
    flags : ShaderFlags,
    pool : EffectPool,
    compilationErrors : String
) : Effect;

Parameters

device Microsoft.DirectX.Direct3D.Device. The Device that will create the effect.
data System.IO.Stream. A Stream Leave Site object that contains the data used to create the Effect.
preprocessorDefines Microsoft.DirectX.Direct3D.Macro[]. Optional array of preprocessor macro definitions. For more information, see Macro.
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.
pool Microsoft.DirectX.Direct3D.EffectPool. An EffectPool object to use for shared parameters. If this value is null, no parameters are shared.
compilationErrors System.String. String that contains a listing of compilation errors.

Return Value

Microsoft.DirectX.Direct3D.Effect . An Effect that contains the compiled effect.

Remarks

Exceptions
InvalidCallException The method call is invalid. For example, a method's parameter might contain an invalid value.
InvalidDataException The data is invalid.
OutOfMemoryException Leave Site Microsoft® Direct3D® could not allocate sufficient memory to complete the call.

See Also


© 2004 Microsoft Corporation. All rights reserved. Terms of use.

Feedback? Please provide us with your comments on this topic.
For more help, visit the DirectX Developer Center