Track current program in context, rather than renderers

This commit is contained in:
Tom Payne
2013-10-31 16:48:37 +01:00
parent 10c41cd064
commit 26fa8d9d53
3 changed files with 40 additions and 22 deletions

View File

@@ -175,7 +175,7 @@ ol.renderer.webgl.TileLayer.prototype.renderFrame =
gl.disable(goog.webgl.BLEND);
var program = context.getProgram(this.fragmentShader_, this.vertexShader_);
gl.useProgram(program);
context.useProgram(program);
if (goog.isNull(this.locations_)) {
this.locations_ =
new ol.renderer.webgl.tilelayer.shader.Locations(gl, program);