AnalyticalGraphicsInc/cesium — pull request #1182 by bagnell (2013-09-25 00:38:42+00:00)
Title: Materials

* Only updates uniforms that needs updating like for loading textures and cube maps from urls. Other uniforms are mapped to values set in the public `uniforms` property.
* Removes the `context` from material construction. There is now an `update` function that primitives are responsible for calling when they are updated.
* This fixes the performance problem with polylines setting uniforms. `getUniformType` in `Material.js` was 3 - 4% when profiling. It was replaced by `Material.prototype.update` which is about 0.3 - 0.4%.
* Also fixes #1123.

@pjcozzi I noticed that a lot of the textures created by materials are leaked because the materials are never destroyed. Who is responsible for destroying the materials?