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

excessive calls to glObjectLabel etc #2356

Open
Trass3r opened this issue Feb 2, 2025 · 0 comments
Open

excessive calls to glObjectLabel etc #2356

Trass3r opened this issue Feb 2, 2025 · 0 comments

Comments

@Trass3r
Copy link
Contributor

Trass3r commented Feb 2, 2025

glObjectLabel is being called for every update in setVertexAttrib instead of just once right after creation:

if (vb.getName() != null) glext.glObjectLabel(GLExt.GL_BUFFER, vb.getId(), vb.getName());

This actually shows up in RenderDoc and in a CPU usage profile.
Also vb.getName() never returns null.

Also if not done right after creation it's easy to miss something, e.g. index buffers are never set cause of

public void setVertexAttrib(VertexBuffer vb, VertexBuffer idb) {
if (vb.getBufferType() == VertexBuffer.Type.Index) {
throw new IllegalArgumentException("Index buffers not allowed to be set to vertex attrib");

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

No branches or pull requests

1 participant