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

two phase batching with buffers #36

Merged
merged 1 commit into from
Sep 8, 2022
Merged

two phase batching with buffers #36

merged 1 commit into from
Sep 8, 2022

Conversation

nkast
Copy link

@nkast nkast commented Sep 6, 2022

Similar to how we batch sprites in DirectX.
10-20% faster SpriteBatch.Draw() when alternating between textures (having to call FlushVertexArray() for each sprite).
250% faster when batching textures, e.g SpriteBatch.DrawString().

Before merging we need to impement DynamicVertexBuffer.SetData(...) with SetDataOptions.Discard on WebGL/Blazor.

@nkast nkast merged commit 5e910b0 into main Sep 8, 2022
@nkast nkast deleted the SpriteBatcher_buffers branch September 8, 2022 14:17
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