Skip to content

Commit 83f3f9c

Browse files
committed
Changed scissor order.
1 parent b3c3b4b commit 83f3f9c

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

src/renderer/webgl/WebGLRenderer.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -839,10 +839,10 @@ var WebGLRenderer = new Class({
839839

840840
scissorStack.push(scissor);
841841

842-
this.currentScissor = scissor;
843-
844842
this.setScissor(x, y, width, height);
845843

844+
this.currentScissor = scissor;
845+
846846
return scissor;
847847
},
848848

@@ -870,12 +870,12 @@ var WebGLRenderer = new Class({
870870

871871
if (cx !== x || cy !== y || cw !== width || ch !== height)
872872
{
873-
this.flush();
874-
875873
// https://developer.mozilla.org/en-US/docs/Web/API/WebGLRenderingContext/scissor
876874

877875
if (width > 0 && height > 0)
878876
{
877+
this.flush();
878+
879879
gl.scissor(x, (this.drawingBufferHeight - y - height), width, height);
880880
}
881881
}

0 commit comments

Comments
 (0)