You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Because the bind() calls in setPixels is not necessarily going to be the same active unit as the user requests with tex.bind(n), it seems like it is causing some issues. I didn't realize this but according to the spec, the two seem tied somehow:
glTexImage2D specifies a two-dimensional or cube-map texture for the current texture unit, specified with glActiveTexture.
The text was updated successfully, but these errors were encountered:
I wonder if we should keep track of the most recently bound texture unit for that instance, and bind to that? So:
tex1.setPixels(...)// binds to 0tex1.bind(3)tex2.bind(5)tex1.setPixels(...)// binds to 3
A little less likely to cause issues, but it might still result in weirdness if you're working at the WebGL level. Either way would be worth one of us documenting this behaviour in the readme's setPixels() docs when/if we next have a chance :)
This seems to be causing issues with
gl-audio-analyser
stackgl/gl-audio-analyser#1
Because the
bind()
calls insetPixels
is not necessarily going to be the same active unit as the user requests withtex.bind(n)
, it seems like it is causing some issues. I didn't realize this but according to the spec, the two seem tied somehow:The text was updated successfully, but these errors were encountered: