Remove hit detection transforms from ol/renderer/webgl/PointsLayer
This commit is contained in:
@@ -301,18 +301,6 @@ class WebGLPointsLayerRenderer extends WebGLLayerRenderer {
|
|||||||
*/
|
*/
|
||||||
this.renderInstructions_ = new Float32Array(0);
|
this.renderInstructions_ = new Float32Array(0);
|
||||||
|
|
||||||
/**
|
|
||||||
* @type {import("../../transform.js").Transform}
|
|
||||||
* @private
|
|
||||||
*/
|
|
||||||
this.hitRenderTransform_ = createTransform();
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @type {import("../../transform.js").Transform}
|
|
||||||
* @private
|
|
||||||
*/
|
|
||||||
this.invertHitRenderTransform_ = createTransform();
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* These instructions are used for hit detection
|
* These instructions are used for hit detection
|
||||||
* @type {Float32Array}
|
* @type {Float32Array}
|
||||||
@@ -341,26 +329,17 @@ class WebGLPointsLayerRenderer extends WebGLLayerRenderer {
|
|||||||
this.indicesBuffer_.fromArrayBuffer(received.indexBuffer);
|
this.indicesBuffer_.fromArrayBuffer(received.indexBuffer);
|
||||||
this.helper.flushBufferData(this.indicesBuffer_);
|
this.helper.flushBufferData(this.indicesBuffer_);
|
||||||
|
|
||||||
|
this.renderTransform_ = projectionTransform;
|
||||||
|
makeInverseTransform(this.invertRenderTransform_, this.renderTransform_);
|
||||||
if (received.hitDetection) {
|
if (received.hitDetection) {
|
||||||
this.hitRenderTransform_ = projectionTransform;
|
|
||||||
makeInverseTransform(this.invertHitRenderTransform_, this.hitRenderTransform_);
|
|
||||||
this.hitRenderInstructions_ = new Float32Array(event.data.renderInstructions);
|
this.hitRenderInstructions_ = new Float32Array(event.data.renderInstructions);
|
||||||
} else {
|
} else {
|
||||||
this.renderTransform_ = projectionTransform;
|
|
||||||
makeInverseTransform(this.invertRenderTransform_, this.renderTransform_);
|
|
||||||
this.renderInstructions_ = new Float32Array(event.data.renderInstructions);
|
this.renderInstructions_ = new Float32Array(event.data.renderInstructions);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}.bind(this));
|
}.bind(this));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @inheritDoc
|
|
||||||
*/
|
|
||||||
disposeInternal() {
|
|
||||||
super.disposeInternal();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @inheritDoc
|
* @inheritDoc
|
||||||
*/
|
*/
|
||||||
@@ -574,9 +553,6 @@ class WebGLPointsLayerRenderer extends WebGLLayerRenderer {
|
|||||||
this.helper.useProgram(this.hitProgram_);
|
this.helper.useProgram(this.hitProgram_);
|
||||||
this.helper.prepareDrawToRenderTarget(frameState, this.hitRenderTarget_, true);
|
this.helper.prepareDrawToRenderTarget(frameState, this.hitRenderTarget_, true);
|
||||||
|
|
||||||
this.helper.makeProjectionTransform(frameState, this.currentTransform_);
|
|
||||||
multiplyTransform(this.currentTransform_, this.invertHitRenderTransform_);
|
|
||||||
|
|
||||||
this.helper.bindBuffer(this.hitVerticesBuffer_);
|
this.helper.bindBuffer(this.hitVerticesBuffer_);
|
||||||
this.helper.bindBuffer(this.indicesBuffer_);
|
this.helper.bindBuffer(this.indicesBuffer_);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user