phaser - v3.90.0
    Preparing search index...

    Wrapper for a WebGL program, containing all the information that was used to create it.

    A WebGLProgram should never be exposed outside the WebGLRenderer, so the WebGLRenderer can handle context loss and other events without other systems having to be aware of it. Always use WebGLProgramWrapper instead.

    Index

    Constructors

    • Parameters

      • gl: WebGLRenderingContext

        The WebGLRenderingContext to create the WebGLProgram for.

      • vertexSource: string

        The vertex shader source code as a string.

      • fragmentShader: string

        The fragment shader source code as a string.

      Returns WebGLProgramWrapper

    Properties

    fragmentSource: string

    The fragment shader source code as a string.

    gl: WebGLRenderingContext

    The WebGLRenderingContext that owns this WebGLProgram.

    vertexSource: string

    The vertex shader source code as a string.

    webGLProgram: WebGLProgram

    The WebGLProgram being wrapped by this class.

    This property could change at any time. Therefore, you should never store a reference to this value. It should only be passed directly to the WebGL API for drawing.

    Methods

    • Creates a WebGLProgram from the given vertex and fragment shaders.

      This is called automatically by the constructor. It may also be called again if the WebGLProgram needs re-creating.

      Returns void

    • Remove this WebGLProgram from the GL context.

      Returns void