Options
All
  • Public
  • Public/Protected
  • All
Menu

A shader program.

Hierarchy

  • Program

Index

Constructors

constructor

  • new Program(args: object): Program

Properties

Protected _currentIndexBuffer

_currentIndexBuffer: ElementArrayBuffer | null

Protected _currentVertexArrayObject

_currentVertexArrayObject: VertexArrayObject | null

Protected _feedbackBufferMode

_feedbackBufferMode: number

Protected _feedbackVaryings

_feedbackVaryings: string[]

Protected _fragmentShader

_fragmentShader: FragmentShader

Protected _glContext

_glContext: WebGL2RenderingContext | null

Protected _glProgram

_glProgram: WebGLProgram | null

Protected _initializedBuffers

_initializedBuffers: Buffer[]

Protected _initializedUniformBufferObjects

_initializedUniformBufferObjects: UniformBufferObject[]

Protected _initializedUniforms

_initializedUniforms: Uniform[]

Protected _initializedVertexArrayObjects

_initializedVertexArrayObjects: VertexArrayObject[]

Protected _isLinked

_isLinked: boolean

Protected _uninitializedBuffers

_uninitializedBuffers: Buffer[]

Protected _uninitializedUniformBufferObjects

_uninitializedUniformBufferObjects: UniformBufferObject[]

Protected _uninitializedUniforms

_uninitializedUniforms: Uniform[]

Protected _uninitializedVertexArrayObject

_uninitializedVertexArrayObject: VertexArrayObject[]

Protected _vertexShader

_vertexShader: VertexShader

id

id: number | null

Accessors

glProgram

  • get glProgram(): WebGLProgram
  • Returns WebGLProgram when the program is already linked. Otherwise throws an error.

    Returns WebGLProgram

isLinked

  • get isLinked(): boolean

Methods

_link

  • _link(context: WebGL2RenderingContext): void
  • Links the shader program. This method is called internally. So you don't have to call this method manually.

    Parameters

    • context: WebGL2RenderingContext

    Returns void

activate

  • activate(): void

activateElementArrayBuffer

activateVertexArrayObject

addBuffer

  • addBuffer(buffer: Buffer): void

addUniform

  • addUniform(uniform: Uniform): void

addUniformBufferObject

addVertexArrayObject

deactivate

  • deactivate(): void

draw

  • draw(mode: number, count?: number | null): void
  • Issues a draw call, which draws graphics.

    Parameters

    • mode: number
    • Default value count: number | null = null

    Returns void

Generated using TypeDoc