|
|
@@ -207,7 +207,7 @@ class WebGLBackend extends Backend {
|
|
|
|
|
|
const { x, y, width, height } = renderContext.scissorValue;
|
|
|
|
|
|
- gl.scissor( x, y, width, height );
|
|
|
+ gl.scissor( x, renderContext.height - height - y, width, height );
|
|
|
|
|
|
}
|
|
|
|
|
|
@@ -296,8 +296,10 @@ class WebGLBackend extends Backend {
|
|
|
|
|
|
const { x, y, width, height } = renderContext.scissorValue;
|
|
|
|
|
|
- gl.blitFramebuffer( x, y, x + width, y + height, x, y, x + width, y + height, mask, gl.NEAREST );
|
|
|
- gl.invalidateSubFramebuffer( gl.READ_FRAMEBUFFER, renderTargetContextData.invalidationArray, x, y, width, height );
|
|
|
+ const viewY = renderContext.height - height - y;
|
|
|
+
|
|
|
+ gl.blitFramebuffer( x, viewY, x + width, viewY + height, x, viewY, x + width, viewY + height, mask, gl.NEAREST );
|
|
|
+ gl.invalidateSubFramebuffer( gl.READ_FRAMEBUFFER, renderTargetContextData.invalidationArray, x, viewY, width, height );
|
|
|
|
|
|
} else {
|
|
|
|
|
|
@@ -404,7 +406,7 @@ class WebGLBackend extends Backend {
|
|
|
const gl = this.gl;
|
|
|
const { x, y, width, height } = renderContext.viewportValue;
|
|
|
|
|
|
- gl.viewport( x, y, width, height );
|
|
|
+ gl.viewport( x, renderContext.height - height - y, width, height );
|
|
|
|
|
|
}
|
|
|
|