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

Support multiple Buffers sources for Attributes (both interleaved and packed) #22

Open
yanchith opened this issue Jul 2, 2018 · 0 comments

Comments

@yanchith
Copy link
Owner

yanchith commented Jul 2, 2018

Currently, we can only pass in one buffer per attribute, but it is often desired to have multiple data sources in a single buffer, e.g. by interleaving values [position, color, position, color, ...].

WebGL let's the user control this via stride and offset parameters to gl.vertexAttribPointer(). Since we already expose other parameters to gl.vertexAttribPointer(), we can expose these two as well.

Also note that currently it is possible to pass a number[] as buffer in AttributePointerConfig. This must be disallowed since it would silently upload the same vertex buffer multiple times. This is no longer possible to do, so we should be good.

@yanchith yanchith changed the title Support interleaved data in Buffers Support interleaved and packed data in Attributes Oct 16, 2018
@yanchith yanchith changed the title Support interleaved and packed data in Attributes Support multiple Buffers sources for Attributes (both interleaved and packed) Oct 16, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant