瀏覽代碼

Pass `height` to `webgl.readPixels`

Damian Tarnawski 1 年之前
父節點
當前提交
0580eebd2a
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      vendor/wasm/js/runtime.js

+ 1 - 1
vendor/wasm/js/runtime.js

@@ -669,7 +669,7 @@ class WebGLInterface {
 
 
 			ReadnPixels: (x, y, width, height, format, type, bufSize, data) => {
-				this.ctx.readPixels(x, y, width, format, type, this.mem.loadBytes(data, bufSize));
+				this.ctx.readPixels(x, y, width, height, format, type, this.mem.loadBytes(data, bufSize));
 			},
 			RenderbufferStorage: (target, internalformat, width, height) => {
 				this.ctx.renderbufferStorage(target, internalformat, width, height);