API reference
Preparing search index…

Native-owned program; source loading and compilation run asynchronously.

Source & inheritance
Member directory12

Constructors

Properties

Methods

Constructors

Properties

CurrentTexture: typeof CurrentTexture = ...

Texture uniform placeholder using the texture bound to the current object at draw time.

Source & inheritance
Type: typeof ShaderType = ShaderType

Shader stage enumeration.

Source & inheritance

Methods

  • Returns the OpenGL program identifier, or 0 if compilation has not succeeded.

    Returns

    number
    Source & inheritance
  • Compiles files asynchronously; accepts a file and stage, vertex/fragment files, or vertex/geometry/fragment files.

    Parameters

    ...sources
    [string, string] | [string, ShaderType] | [string, string, string]

    Returns

    Promise<boolean>
    Source & inheritance
  • Compiles GLSL source asynchronously; argument order matches loadFromFile. Returns whether compilation and linking succeeded.

    Parameters

    ...sources
    [string, string] | [string, ShaderType] | [string, string, string]

    Returns

    Promise<boolean>
    Source & inheritance
  • Returns whether the current environment supports shaders.

    Returns

    boolean
    Source & inheritance
  • Returns whether the current environment supports geometry shaders.

    Returns

    boolean
    Source & inheritance

Icons made by Lorc, Delapouite & Skoll · game-icons.net · CC BY 3.0