Merge pull request #9767 from jahow/webgl-hit-retina

Fix hit detection for webgl layers on retina devices
This commit is contained in:
Olivier Guyot
2019-07-15 09:06:59 +02:00
committed by GitHub
2 changed files with 79 additions and 34 deletions

View File

@@ -449,6 +449,7 @@ class WebGLHelper extends Disposable {
const gl = this.getGL();
gl.bindFramebuffer(gl.FRAMEBUFFER, renderTarget.getFramebuffer());
gl.viewport(0, 0, frameState.size[0], frameState.size[1]);
gl.bindTexture(gl.TEXTURE_2D, renderTarget.getTexture());
gl.clearColor(0.0, 0.0, 0.0, 0.0);
gl.clear(gl.COLOR_BUFFER_BIT);