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

BufferAttribute: Deprecate .dynamic, introduce .usage. #17445

Merged
merged 3 commits into from
Oct 3, 2019

Conversation

Mugen87
Copy link
Collaborator

@Mugen87 Mugen87 commented Sep 7, 2019

Fixed #14730

I've managed it to make the change backwards-compatible. So BufferAttribute.dynamic and BufferAttribute.setDynamic() can still be used but with warnings. Same for InterleavedBuffer's interface.

The new usage property directly maps to the same-named parameter of WebGLRenderingContext.bufferData(). So this property is now only intended to define the usage pattern of the buffer data for optimization purposes.

WebGLAttributes.updateBuffer() only uses bufferSubData() now. Keep in mind that the initial buffer upload is done with bufferData() as before.

@Mugen87
Copy link
Collaborator Author

Mugen87 commented Oct 3, 2019

Merging see #17454 (comment)

The sooner it lands in dev, the more time we have for verification.

@Mugen87 Mugen87 merged commit a9913a4 into mrdoob:dev Oct 3, 2019
@Mugen87
Copy link
Collaborator Author

Mugen87 commented Oct 3, 2019

Updated builds: 3a3d2b1

@mrdoob
Copy link
Owner

mrdoob commented Oct 4, 2019

Thanks!

<p>
Defines the intended usage pattern of the data store for optimization purposes. Corresponds to the *usage* parameter of
[link:https://developer.mozilla.org/en-US/docs/Web/API/WebGLRenderingContext/bufferData WebGLRenderingContext.bufferData]().
Default is *THREE.StaticDrawUsage*.
Copy link
Collaborator

Choose a reason for hiding this comment

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

This needs to link to a description of the values it can take.

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.

BufferAttribute.dynamic: revisited
3 participants