Move sequence so the renderer is clean

This commit is contained in:
Richard Davey 2020-10-27 18:06:13 +00:00
parent f42f0ce0d6
commit a5d6016e64

View file

@ -2224,8 +2224,6 @@ var WebGLRenderer = new Class({
gl.enable(gl.SCISSOR_TEST); gl.enable(gl.SCISSOR_TEST);
this.pipelines.preRender();
this.currentScissor = this.defaultScissor; this.currentScissor = this.defaultScissor;
this.scissorStack.length = 0; this.scissorStack.length = 0;
@ -2242,6 +2240,8 @@ var WebGLRenderer = new Class({
this.textureFlush = 0; this.textureFlush = 0;
this.pipelines.preRender();
this.pipelines.setMulti(); this.pipelines.setMulti();
}, },
@ -2361,9 +2361,7 @@ var WebGLRenderer = new Class({
{ {
if (this.contextLost) { return; } if (this.contextLost) { return; }
this.flush(); this.pipelines.postRender();
// Unbind custom framebuffer here
var state = this.snapshotState; var state = this.snapshotState;
@ -2374,8 +2372,6 @@ var WebGLRenderer = new Class({
state.callback = null; state.callback = null;
} }
this.pipelines.postRender();
if (this.textureFlush > 0) if (this.textureFlush > 0)
{ {
this.startActiveTexture++; this.startActiveTexture++;