Share via


FragmentLinker.LinkShader(String,ShaderFlags,EffectHandle[],String) Method (Microsoft.DirectX.Direct3D)

Links a compiled shader at run time.

Definition

Visual Basic Public Function LinkShader( _
    ByVal profile As String, _
    ByVal flags As ShaderFlags, _
    ByVal fragmentHandles() As EffectHandle, _
    ByRef errors As String _
) As GraphicsStream
C# public GraphicsStream LinkShader(
    string profile,
    ShaderFlags flags,
    EffectHandle[] fragmentHandles,
    out string errors
);
C++ public:
GraphicsStreamLinkShader(
    StringLeave Siteprofile,
    ShaderFlags flags,
    array<EffectHandle^>^ fragmentHandles,
    [Out] StringLeave Site^% errors
);
JScript public function LinkShader(
    profile : String,
    flags : ShaderFlags,
    fragmentHandles : EffectHandle[],
    errors : String
) : GraphicsStream;

Parameters

profile System.String
A StringLeave Site that contains the compiled shader profile that determines the shader instruction set.
flags Microsoft.DirectX.Direct3D.ShaderFlags
A ShaderFlags enumeration that specifies the link options to use.
fragmentHandles Microsoft.DirectX.Direct3D.EffectHandle[]
Array of EffectHandle objects that represent the handles of the fragments to link.
errors System.String
A StringLeave Site that contains a listing of errors and warnings that were encountered during compilation.

Return Value

Microsoft.DirectX.GraphicsStream
A GraphicsStream object that contains the linked shader. This buffer contains the compiled shader code as well as any embedded debug and symbol table information.

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.