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 198

Get the WebGL rendering context

Returns:
The rendering context.

getHitDetectionFramebuffer(){WebGLFramebuffer} experimental

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

Get the frame buffer for hit detection.

Returns:
The hit detection frame buffer.

useProgram(program){boolean} experimental

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

Use a program. If the program is already in use, this will return false.

Name Type Description
program WebGLProgram

Program.

Returns:
Changed.