wtc-gl
    Preparing search index...

    Class Program

    The program class prvides the rendering setup, internal logic, and state for rendering an object.

    Index

    Constructors

    Properties

    attributeLocations: WTCGLAttributeMap

    A map of attribute locations in use within the program shaders

    attributeOrder: string

    A join of the found attributes. Used for addressing vertex array objects on the geometry.

    blendEquation: WTCGLBlendEquation

    The blend equation to use

    The blend function to use

    cullFace: number

    Face culling used.

    gl.BACK
    
    depthFunc: number

    The depth function to use when determinging the current pixel against the depth buffer

    gl.LESS
    
    depthTest: boolean

    Whether to depth test objects in this program

    true
    
    depthWrite: boolean

    Whether to write depth information

    true
    
    frontFace: number

    How to determine if a face is front-facing, whether it's points are drawn clockwise or counter-clockwise. Default is counter-clockwise.

    gl.CCW
    

    The WTCGL rendering context object

    id: number

    The ID of the program. Simple auto-incremening. Used for identifying the program for setup.

    program: WebGLProgram

    The webgl program store

    textureUnit: number = -1

    The texture unit. Used for addressing texture units in-program.

    transparent: boolean

    Whether to render transparency.

    false
    
    uniformLocations: WTCGLUniformMap

    A map of uniform locations in use within the program shaders

    The array uf uniforms for this program

    Methods

    • set the blend equation

      Parameters

      • modeRGB: number

        The mode to blend when using RGB

      • modeAlpha: number

        The mode to blend when using RGBA

      Returns void

    • Set the blend function based on source and destination parameters

      Parameters

      • src: number

        the source blend function

      • dst: number

        The destination blend function

      • OptionalsrcAlpha: number

        the source blend function for alpha blending

      • OptionaldstAlpha: number

        the destination blend function for alpha blending

      Returns void

    • Set up the program for use

      Parameters

      • flipFaces: { flipFaces?: boolean } = {}

        Flip the faces, for when a mesh is scaled in teh negative

      Returns void