Correctly draw polygons with transparent border
This commit is contained in:
@@ -495,6 +495,7 @@ ol.render.webgl.LineStringReplay.prototype.drawReplay = function(gl, context, sk
|
||||
gl.enable(gl.DEPTH_TEST);
|
||||
gl.depthMask(true);
|
||||
gl.depthFunc(gl.NOTEQUAL);
|
||||
gl.clear(gl.DEPTH_BUFFER_BIT);
|
||||
}
|
||||
|
||||
if (!ol.obj.isEmpty(skippedFeaturesHash)) {
|
||||
@@ -515,7 +516,6 @@ ol.render.webgl.LineStringReplay.prototype.drawReplay = function(gl, context, sk
|
||||
}
|
||||
}
|
||||
if (!hitDetection) {
|
||||
gl.clear(gl.DEPTH_BUFFER_BIT);
|
||||
gl.disable(gl.DEPTH_TEST);
|
||||
//Restore GL parameters.
|
||||
gl.depthMask(tmpDepthMask);
|
||||
|
||||
@@ -252,6 +252,13 @@ ol.render.webgl.Replay.prototype.replay = function(context,
|
||||
featureCallback, oneByOne, opt_hitExtent) {
|
||||
var gl = context.getGL();
|
||||
|
||||
if (this.lineStringReplay) {
|
||||
this.lineStringReplay.replay(context,
|
||||
center, resolution, rotation, size, pixelRatio,
|
||||
opacity, skippedFeaturesHash,
|
||||
featureCallback, oneByOne, opt_hitExtent);
|
||||
}
|
||||
|
||||
// bind the vertices buffer
|
||||
ol.DEBUG && console.assert(this.verticesBuffer,
|
||||
'verticesBuffer must not be null');
|
||||
@@ -299,13 +306,6 @@ ol.render.webgl.Replay.prototype.replay = function(context,
|
||||
// disable the vertex attrib arrays
|
||||
this.shutDownProgram_(gl, locations);
|
||||
|
||||
if (this.lineStringReplay) {
|
||||
this.lineStringReplay.replay(context,
|
||||
center, resolution, rotation, size, pixelRatio,
|
||||
opacity, skippedFeaturesHash,
|
||||
featureCallback, oneByOne, opt_hitExtent);
|
||||
}
|
||||
|
||||
return result;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user