Skip to content

Commit

Permalink
fix(webgl): bind FBO in readTexture()
Browse files Browse the repository at this point in the history
  • Loading branch information
postspectacular committed Jul 28, 2020
1 parent fd6ffdb commit 6cb4448
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions packages/webgl/src/readpixels.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ export const readTexture = <
out: T
) => {
const fbo = new FBO(gl, { tex: [tex] });
fbo.bind();
gl.readPixels(0, 0, tex.size[0], tex.size[1], format, type, out);
fbo.unbind();
fbo.release();
Expand Down

0 comments on commit 6cb4448

Please sign in to comment.