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 support for luma.gl buffers as external attributes #4121

Merged
merged 2 commits into from
Jan 9, 2020

Conversation

Pessimistress
Copy link
Collaborator

For #4114

Change List

  • Do not throw (in most cases) when value is missing from external buffer
  • Allow external buffer to override the type accessor

Copy link
Contributor

@1chandu 1chandu left a comment

Choose a reason for hiding this comment

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

Just one comment, otherwise looks good.

@@ -216,7 +216,7 @@ export default class DataColumn {
this.value = opts.value;

// Copy the type of the buffer into the accessor
accessor.type = buffer.accessor.type;
accessor.type = opts.type || buffer.accessor.type;
Copy link
Contributor

Choose a reason for hiding this comment

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

Once Buffer is created, type is fixed isn't it? why do we have to overwrite this? Is this covering non external buffer case?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

buffer.accessor.type is inferred from the data type array that is used to populate it by luma, but the chunk of memory can be interpreted as any data type in WebGL. This is needed if you use interleaved buffer with mixed data types.

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.

None yet

2 participants