Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix switching between const and non-const attributes #545

Merged
merged 3 commits into from
Sep 7, 2019

Conversation

rreusser
Copy link
Member

@rreusser rreusser commented Sep 7, 2019

This PR fixes switching between constant and non-constant attributes. See: #474. At the end of the day, the simple problem was that constant attributes set some properties on the BINDING via

          CUTE_COMPONENTS.map(function (c, i) { 
            return BINDING + '.' + c + '=' + CONST_COMPONENTS[i] + ';'
          }).join(''),

but do not actively unset buffer. As a result, the the next call to a buffer attribute does not notice that buffer attributes were previously disabled and now must be enabled. The solution was to simply set BINDING.buffer=null when using constant attributes.

The other half of the debugging was working around a strange instanced arrays interaction detailed in #544.

Sorry it took so long to get to to the bottom of this, but thanks @dy for providing such a debuggable test case!

@rreusser rreusser requested a review from dy September 7, 2019 20:47
@rreusser
Copy link
Member Author

rreusser commented Sep 7, 2019

Yeah, travis doesn't pass anymore for what seems like changes to the v8 API. I'm inclined to merge this anyway since I've tried pretty hard to ensure it passes the tests and since I don't have the bandwidth to spend a day or two on headless-gl.

@rreusser rreusser merged commit 3ae33a1 into master Sep 7, 2019
@rreusser rreusser deleted the fix-constant-attributes-take-2 branch September 7, 2019 20:58
@milcktoast
Copy link
Contributor

@rreusser I've had to switch to using node ^8.x with headless-gl.

@rreusser
Copy link
Member Author

rreusser commented Sep 10, 2019

Maybe .travis.yml just needs an update?

regl/.travis.yml

Lines 14 to 15 in 12cb14b

node_js:
- '6'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants