O'Reilly logo

Mastering OpenLayers 3 by Gábor Farkas

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Clipping a layer with WebGL

In the last example, called ch07_clip_webgl, we will go through some of the key aspects of working with WebGL and OpenLayers 3. WebGL is an exceptionally rich JavaScript port of OpenGL, which is capable of performing advanced 3D GPU calculations. However, as the OpenLayers 3 library already uses it and parameterizes it, when we use the WebGL renderer in the precompose and postcompose rendering hooks, we have only a limited number of possibilities. For example, OpenGL can automatically blend textures into each other with some blending options. However, as OpenLayers 3 already uses this capability in order to draw the layers on each other with a possible transparency option, we cannot change the global blending property ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required