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

Expose srcOffset and length of bufferSubData in VertexBuffer.data #184

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

bullno1
Copy link

@bullno1 bullno1 commented Feb 7, 2021

Use case: I'm writing a sprite batcher which fills a CPU vertex buffer every time a new sprite is drawn.
When the buffer is "full" or when there are no more sprite to draw, it will upload everything into a VBO and render.
To make partially filled buffer uploads more efficient, it is necessary to specify the length. srcOffset is a "might as well" add since it is part of bufferSubData.

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

1 participant