Effect.FromString(Device,String,Include,String,ShaderFlags,EffectPool) Method (Microsoft.DirectX.Direct3D)
Creates an effect from an ASCII or binary effect description in a string.
Definition
Visual Basic Public Shared Function FromString( _
ByVal device As Device, _
ByVal sourceData As String, _
ByVal includeFile As Include, _
ByVal skipConstants As String, _
ByVal flags As ShaderFlags, _
ByVal pool As EffectPool _
) As EffectC# public static Effect FromString(
Device device,
string sourceData,
Include includeFile,
string skipConstants,
ShaderFlags flags,
EffectPool pool
);C++ public:
static Effect^ FromString(
Device^ device,
String^ sourceData,
Include^ includeFile,
String^ skipConstants,
ShaderFlags flags,
EffectPool^ pool
);JScript public static function FromString(
device : Device,
sourceData : String,
includeFile : Include,
skipConstants : String,
flags : ShaderFlags,
pool : EffectPool
) : Effect;
Parameters
device Microsoft.DirectX.Direct3D.Device
The Device that will create the effect.sourceData System.String
A String that describes the Effect 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.skipConstants System.String
A string of effect parameters that will be ignored by the effect system. The string must be NULL terminated and needs to contain the name of each application-managed constant separated by a semicolon.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.
Return Value
Microsoft.DirectX.Direct3D.Effect
An Effect that contains the compiled effect.
Remarks
Exceptions
The method call is invalid. For example, a method's parameter might contain an invalid value.
The data is invalid.
Microsoft Direct3D could not allocate sufficient memory to complete the call.