Get opacity from layerState in webglmaprenderer

instead of getting it from layer.getOpacity().
Fix the issue of changing opacity which didn't work with LayerGroups in webgl.
This commit is contained in:
Bruno Binet
2013-06-12 10:29:50 +02:00
parent f3b63d9c2c
commit 1100cc67da

View File

@@ -645,7 +645,7 @@ ol.renderer.webgl.Map.prototype.renderFrame = function(frameState) {
gl.uniformMatrix4fv(locations.u_colorMatrix, false,
layerRenderer.getColorMatrix());
}
gl.uniform1f(locations.u_opacity, layer.getOpacity());
gl.uniform1f(locations.u_opacity, layerState.opacity);
gl.bindTexture(goog.webgl.TEXTURE_2D, layerRenderer.getTexture());
gl.drawArrays(goog.webgl.TRIANGLE_STRIP, 0, 4);