Options
All
  • Public
  • Public/Protected
  • All
Menu

Class GPGPUContext

Hierarchy

  • GPGPUContext

Index

Constructors

constructor

  • new GPGPUContext(gl?: WebGLRenderingContext): GPGPUContext

Properties

colorBufferFloatExtension

colorBufferFloatExtension: __type

framebuffer

framebuffer: WebGLFramebuffer

getBufferSubDataAsyncExtension

getBufferSubDataAsyncExtension: __type

gl

gl: WebGLRenderingContext

indexBuffer

indexBuffer: WebGLBuffer

loseContextExtension

loseContextExtension: WebGLLoseContextExtension

outputTexture

outputTexture: WebGLTexture | null = null

program

program: WebGLProgram | null = null

textureFloatExtension

textureFloatExtension: __type

vertexBuffer

vertexBuffer: WebGLBuffer

Methods

blockUntilAllProgramsCompleted

  • blockUntilAllProgramsCompleted(): void

createMatrixTexture

  • createMatrixTexture(rows: number, columns: number): WebGLTexture

createPackedMatrixTexture

  • createPackedMatrixTexture(rows: number, columns: number): WebGLTexture

createProgram

  • createProgram(fragmentShaderSource: string): WebGLProgram

debugValidate

  • debugValidate(): void

deleteMatrixTexture

  • deleteMatrixTexture(texture: WebGLTexture): void

deleteProgram

  • deleteProgram(program: WebGLProgram): void

dispose

  • dispose(): void

downloadMatrixFromPackedTexture

  • downloadMatrixFromPackedTexture(texture: WebGLTexture, rows: number, columns: number): Float32Array

downloadMatrixFromRGBAColorTexture

  • downloadMatrixFromRGBAColorTexture(texture: WebGLTexture, rows: number, columns: number, channels: number): Float32Array

downloadMatrixFromTexture

  • downloadMatrixFromTexture(texture: WebGLTexture, rows: number, columns: number): Float32Array

downloadMatrixFromTextureAsync

  • downloadMatrixFromTextureAsync(texture: WebGLTexture, rows: number, columns: number): Promise<Float32Array>

enableAutomaticDebugValidation

  • enableAutomaticDebugValidation(enabled: boolean): void

executeProgram

  • executeProgram(attribLocations?: object): void

getAttributeLocation

  • getAttributeLocation(program: WebGLProgram, attribute: string): number

getUniformLocation

  • getUniformLocation(program: WebGLProgram, uniformName: string): WebGLUniformLocation

getUniformLocationNoThrow

  • getUniformLocationNoThrow(program: WebGLProgram, uniformName: string): WebGLUniformLocation

runQuery

  • runQuery(queryFn: function): Promise<number>
  • Executes a query function which contains GL commands and resolves when the command buffer has finished executing the query.

    Parameters

    • queryFn: function

      The query function containing GL commands to execute.

        • (): void
        • Returns void

    Returns Promise<number>

    a promise that resolves with the ellapsed time in milliseconds.

setInputMatrixTexture

  • setInputMatrixTexture(inputMatrixTexture: WebGLTexture, uniformLocation: WebGLUniformLocation, textureUnit: number): void

setOutputMatrixTexture

  • setOutputMatrixTexture(outputMatrixTexture: WebGLTexture, rows: number, columns: number): void

setOutputMatrixWriteRegion

  • setOutputMatrixWriteRegion(startRow: number, numRows: number, startColumn: number, numColumns: number): void

setOutputPackedMatrixTexture

  • setOutputPackedMatrixTexture(outputPackedMatrixTexture: WebGLTexture, rows: number, columns: number): void

setOutputPackedMatrixWriteRegion

  • setOutputPackedMatrixWriteRegion(startRow: number, numRows: number, startColumn: number, numColumns: number): void

setProgram

  • setProgram(program: WebGLProgram | null): void

uploadMatrixToPackedTexture

  • uploadMatrixToPackedTexture(texture: WebGLTexture, rows: number, columns: number, matrix: Float32Array): void

uploadMatrixToTexture

  • uploadMatrixToTexture(texture: WebGLTexture, rows: number, columns: number, matrix: Float32Array): void

uploadPixelDataToTexture

  • uploadPixelDataToTexture(texture: WebGLTexture, pixels: ImageData | HTMLImageElement | HTMLCanvasElement): void

Generated using TypeDoc