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
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.
The text was updated successfully, but these errors were encountered:
yanchith
changed the title
Support interleaved data in Buffers
Support interleaved and packed data in Attributes
Oct 16, 2018
yanchith
changed the title
Support interleaved and packed data in Attributes
Support multiple Buffers sources for Attributes (both interleaved and packed)
Oct 16, 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
andoffset
parameters togl.vertexAttribPointer()
. Since we already expose other parameters togl.vertexAttribPointer()
, we can expose these two as well.Also note that currently it is possible to pass aThis is no longer possible to do, so we should be good.number[]
asbuffer
inAttributePointerConfig
. This must be disallowed since it would silently upload the same vertex buffer multiple times.The text was updated successfully, but these errors were encountered: