Constructors
constructor
- new WebGLState(gl): WebGLState
Parameters
- gl: WebGLRenderingContext
Properties
buffers
Methods
enable
- enable(id): void
Returns void
disable
- disable(id): void
Returns void
bindFramebuffer
- bindFramebuffer(target, framebuffer): void
Returns void
drawBuffers
- drawBuffers(renderTarget, framebuffer): void
Returns void
useProgram
- useProgram(program): boolean
Returns boolean
setBlending
- setBlending(blending, blendEquation?, blendSrc?, blendDst?, blendEquationAlpha?, blendSrcAlpha?, blendDstAlpha?, premultiplyAlpha?): void
Returns void
setMaterial
- setMaterial(material, frontFaceCW): void
Returns void
setFlipSided
- setFlipSided(flipSided): void
Returns void
setCullFace
- setCullFace(cullFace): void
Returns void
setLineWidth
- setLineWidth(width): void
Returns void
setPolygonOffset
- setPolygonOffset(polygonoffset, factor?, units?): void
Parameters
- polygonoffset: boolean
Optional
factor: numberOptional
units: number
Returns void
setScissorTest
- setScissorTest(scissorTest): void
Returns void
activeTexture
- activeTexture(webglSlot): void
Returns void
bindTexture
- bindTexture(webglType, webglTexture): void
Parameters
- webglType: number
- webglTexture: any
Returns void
unbindTexture
- unbindTexture(): void
Returns void
compressedTexImage2D
- compressedTexImage2D(target, level, internalformat, width, height, border, data): void
Parameters
- target: number
- level: number
- internalformat: number
- width: number
- height: number
- border: number
- data: ArrayBufferView
Returns void
texImage2D
- texImage2D(target, level, internalformat, width, height, border, format, type, pixels): void
Parameters
- target: number
- level: number
- internalformat: number
- width: number
- height: number
- border: number
- format: number
- type: number
- pixels: null | ArrayBufferView
Returns void
- texImage2D(target, level, internalformat, format, type, source): void
Parameters
- target: number
- level: number
- internalformat: number
- format: number
- type: number
- source: any
Returns void
texImage3D
- texImage3D(target, level, internalformat, width, height, depth, border, format, type, pixels): void
Parameters
- target: number
- level: number
- internalformat: number
- width: number
- height: number
- depth: number
- border: number
- format: number
- type: number
- pixels: any
Returns void
scissor
- scissor(scissor): void
Returns void
viewport
- viewport(viewport): void
Returns void
reset
- reset(): void
Returns void