Skip to content
This repository has been archived by the owner on Aug 15, 2019. It is now read-only.

Unbind the pixel pack buffer after copying the texture into the buffer. #1188

Merged
merged 1 commit into from
Jul 26, 2018

Conversation

nsthorat
Copy link
Contributor

@nsthorat nsthorat commented Jul 26, 2018

Currently, if you interleave .data() and .dataSync() you get the following error:

WebGL: INVALID_OPERATION: readPixels: PIXEL_PACK buffer should not be bound

This is because the pixel pack buffer is bound at the same time the texture is bound to the framebuffer. WebGL does not like this.

To verify this fixes the layers tests, I used yalc to make sure the tests there pass. I also made sure the unit test I wrote failed before I made the fix.

This change is Reviewable

Copy link
Contributor

@dsmilkov dsmilkov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed 2 of 2 files at r1.
Reviewable status: 0 of 1 approvals obtained (waiting on @dsmilkov)

@nsthorat nsthorat merged commit 2776645 into master Jul 26, 2018
@nsthorat nsthorat deleted the pixelpack branch July 26, 2018 00:55
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
2 participants