openlayers/ol3 — pull request #2967 by elemoine (2014-11-21 17:24:47+00:00)
Title: Add support for drawing point with WebGL

This PR adds support for drawing point with WebGL.

Both icons and symbols are supported, and all the icon/symbol styling properties supported by the Canvas renderer are also supported by the WebGL renderer.

We've added two new examples, one with icons and one with symbols. See

* http://erilem.net/ol3/webgl-point/examples/symbol-atlas-webgl.html
* http://erilem.net/ol3/webgl-point/examples/icon-sprite-webgl.html

(These examples use WebGL by default but `?renderer=canvas` can be appended to the URL to use Canvas for comparison.)

The vector API is unchanged. But you have to use an `AtlasManager` for symbols if you want to get good performance with WebGL:

```js
var atlasManager = new ol.style.AtlasManager();
var circle = new ol.style.Circle({
// …
atlasManager: atlasManager
});
```

It should still work w/o the atlas manager, but it will be a lot less performant. The same problem exists for icons. But for icons the application developer is responsible for creating sprites to get good performance.

The `symbol-atlas-webgl` example shows how to use an atlas manager. The `icon-sprite-webgl` example shows how to use an icon sprite.

Drawing points at `postcompose` time, with the immediate API or with feature overlays, is also supported. The `dynamic-data` and `draw-features` examples can now be loaded with `?renderer=webgl` in the URL to see this working.

What this PR does not include: Hit Detection. This is our next (big) step! We will start working on it as soon as this PR is merged.

A final note about the commit history. This PR includes a lot of commits, including merge commits. But we decided to rewrite the commit for this PR. It is a large work, so it makes sense not too loose the history. And we have merge commits that point to PRs on http://github.com/camptocamp/ol3, with valuable information on the code.

Please review.