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

Clean-up GLBuffer interface, use DSA #1511

Merged
merged 5 commits into from
Jan 29, 2025

Conversation

VReaperV
Copy link
Contributor

@VReaperV VReaperV commented Jan 22, 2025

The GLBuffer has started to become unwieldy when setting up buffers, so I cleaned up its interface and made it use Direct State Access versions of the buffer commands where possible instead. These commands allow modyfing buffers without actually binding them, which makes it much easier. I've also removed a lot of duplicate code from GLBuffer itself, as well as the derivative buffers.

glBufferData has been moved to GLBuffer, in line with the other buffer functions.

Cleaned up buffer binding points as well, now they use an enum, and the shaders use defines for it.

Moved buffer init/free to a more appropriate location as well.

Also NUKED the unused GLIndirectBuffer and moved GLIndirectCommand to MaterialSystem.h.

@VReaperV VReaperV added T-Improvement Improvement for an existing feature A-Renderer T-Cleanup labels Jan 22, 2025
src/engine/renderer/Material.cpp Dismissed Show dismissed Hide dismissed
@VReaperV VReaperV force-pushed the dsa-buffers branch 8 times, most recently from 91cc56d to 8e4eb7a Compare January 28, 2025 22:02
@VReaperV
Copy link
Contributor Author

Rebased, doesn't require #1507 anymore.

@slipher
Copy link
Member

slipher commented Jan 29, 2025

LGTM, no diffs in my tests

@VReaperV VReaperV merged commit 396d7ee into DaemonEngine:master Jan 29, 2025
9 checks passed
@VReaperV VReaperV deleted the dsa-buffers branch January 29, 2025 23:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Renderer T-Cleanup T-Improvement Improvement for an existing feature
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants