Functions
compileShader
- compileShader(gl: WebGLRenderingContext, shaderType: GLenum, shaderSource: string): WebGLShader | null
-
Parameters
-
gl: WebGLRenderingContext
-
shaderType: GLenum
-
shaderSource: string
Returns WebGLShader | null
createBuffer
- createBuffer(gl: WebGLRenderingContext, data: Float32Array | Float64Array, usage?: GLenum): WebGLBuffer | null
-
Parameters
-
gl: WebGLRenderingContext
-
data: Float32Array | Float64Array
-
usage: GLenum = ...
Returns WebGLBuffer | null
createIndexBuffer
- createIndexBuffer(gl: WebGLRenderingContext, indices: Uint16Array | Uint32Array, usage?: GLenum): WebGLBuffer | null
-
Parameters
-
gl: WebGLRenderingContext
-
indices: Uint16Array | Uint32Array
-
usage: GLenum = ...
Returns WebGLBuffer | null
createProgram
- createProgram(gl: WebGLRenderingContext, vertexShaderSource: string, fragmentShaderSource: string): WebGLProgram | null
-
Parameters
-
gl: WebGLRenderingContext
-
vertexShaderSource: string
-
fragmentShaderSource: string
Returns WebGLProgram | null
getExtension
- getExtension(gl: WebGLRenderingContext, extensionName: string, caching?: boolean): any
-
Parameters
-
gl: WebGLRenderingContext
-
extensionName: string
-
caching: boolean = false
Returns any
Create and compile WebGLShader