Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • Shaders

Indexable

[key: string]: any

Index

Constructors

constructor

  • new Shaders(webGL: WebGLRenderingContext): Shaders

Properties

extensions

extensions: Extensions = new Extensions()

Extensions objects that allow you to use extensions which was added by addExtension()

shadersRequireLights

shadersRequireLights: ShaderProgram[] = []

webGL

webGL: WebGLRenderingContext

WebGL where attached shaders.

Methods

Private _linkAllAttributesFromSource

addExtension

  • addExtension(name: string, nameInWebGL: string): void
  • Adds extension form webgl to this object with custom name

    Parameters

    • name: string

      custom name to use in shaders

    • nameInWebGL: string

      extension name in webgl

    Returns void

addProgram

  • addProgram(name: string, vertexSource: string, fragmentSource: string, options: Options): void
  • Creates shaders program with {name} and add its to this objects. Auto linking uniforms and attributes.

    Parameters

    • name: string
    • vertexSource: string
    • fragmentSource: string
    • options: Options

    Returns void

Generated using TypeDoc