We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b53c3a2 commit 3afe6d8Copy full SHA for 3afe6d8
1 file changed
v3/src/renderer/webgl/WebGLRenderer.js
@@ -521,6 +521,11 @@ var WebGLRenderer = new Class({
521
dstTexture.texture = gl.createTexture();
522
}
523
524
+ if (dstTexture != this.currentTexture)
525
+ {
526
+ this.currentRenderer.flush();
527
+ }
528
+
529
if (shouldUpdateResource)
530
{
531
// Update resource
@@ -542,7 +547,10 @@ var WebGLRenderer = new Class({
542
547
dstTexture.height = srcCanvas.height;
543
548
544
549
// We must rebind old texture
545
- this.currentTexture = null;
550
+ if (dstTexture != this.currentTexture && this.currentTexture !== null)
551
552
+ gl.bindTexture(gl.TEXTURE_2D, this.currentTexture.texture);
553
546
554
555
return dstTexture;
556
},
0 commit comments