Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Note
This method is available only when developing for Windows.
Compiles a shader from a stream containing shader assembly code (ASM).
Namespace: Microsoft.Xna.Framework.Graphics
Assembly: Microsoft.Xna.Framework (in microsoft.xna.framework.dll)
Syntax
public static CompiledShader AssembleFromFile (
Stream shaderSourceCode,
CompilerMacro[] preprocessorDefines,
CompilerIncludeHandler includeHandler,
CompilerOptions options,
TargetPlatform platform
)
Parameters
- shaderSourceCode
Stream that contains the shader data. - preprocessorDefines
Describes preprocessor definitions used by an effect object. - includeHandler
User-implemented interface to provide callbacks for #include directives during shader compilation. - options
Compilation optimization options. - platform
Target platform for the compilation.
Return Value
The compiled shader.
Exceptions
Exception type | Condition |
---|---|
ArgumentNullException | shaderSourceCode is null. The stream passed into this method cannot be null. |
NotSupportedException | shaderSourceCode is not readable. Streams passed into this method must be readable. |
EndOfStreamException | shaderSourceCode does not contain enough data to support this call. |
See Also
Reference
ShaderCompiler Class
ShaderCompiler Members
Microsoft.Xna.Framework.Graphics Namespace
Platforms
Windows XP SP2, Windows Vista