Class: Context

Context

A WebGL context for accessing low-level WebGL capabilities.

new ol.webgl.Context(canvas, gl) experimental

src/ol/webgl/context.js, line 31
Name Type Description
canvas HTMLCanvasElement

Canvas.

gl WebGLRenderingContext

GL.

Extends

  • goog.events.EventTarget

Methods

getGL(){WebGLRenderingContext} experimental

src/ol/webgl/context.js, line 194
Returns:
GL.

getHitDetectionFramebuffer(){WebGLFramebuffer} experimental

src/ol/webgl/context.js, line 203
Returns:
The framebuffer for the hit-detection.

useProgram(program){boolean} experimental

src/ol/webgl/context.js, line 333

Just return false if that program is used already. Other use that program (call gl.useProgram) and make it the "current program".

Name Type Description
program WebGLProgram

Program.

Returns:
Changed.