Show / Hide Table of Contents

    Interface IShaderFactory

    Factory for creating shaders (IShader).

    Namespace: AGS.API
    Assembly: AGS.API.dll
    Syntax
    public interface IShaderFactory

    Methods

    | Improve this Doc View Source

    FromResource(String, String)

    Creates a shader asynchronously from the source code of the vertex and fragment shaders, which should be passed as the paths for the shader files (either an embedded resource path or a file system path).

    Declaration
    Task<IShader> FromResource(string vertexResource, string fragmentResource)
    Parameters
    Type Name Description
    System.String vertexResource

    Vertex resource path (pass null for using the standard vertex shader).

    System.String fragmentResource

    Fragment resource path (pass null for using the standard fragment shader).

    Returns
    Type Description
    System.Threading.Tasks.Task<IShader>

    The shader.

    | Improve this Doc View Source

    FromText(String, String)

    Creates a shader from the source code of the vertex and fragment shaders, which should be passed as regular text.

    Declaration
    IShader FromText(string vertexSource, string fragmentSource)
    Parameters
    Type Name Description
    System.String vertexSource

    Vertex source (pass null for using the standard vertex shader).

    System.String fragmentSource

    Fragment source (pass null for using the standard fragment shader).

    Returns
    Type Description
    IShader

    The shader.

    • Improve this Doc
    • View Source
    Back to top Generated by DocFX