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

Maintain separate buffers per object, rather than separate VertexArrays per object? #11

Open
aforren1 opened this issue Nov 18, 2021 · 0 comments

Comments

@aforren1
Copy link
Owner

aforren1 commented Nov 18, 2021

Except moderngl currently doesn't maintain state (see e.g. https://github.com/moderngl/moderngl/blob/master/moderngl/src/VertexArray.cpp#L273), so wouldn't do anything meaningful at this point...

If moderngl maintained current program & vertex array ID, could be worthwhile?

But would be a larger structural change? And I probably don't understand all the implications on the moderngl side...

Pseudocode:

Bind shader program
Bind VAO
for obj in objs:
    bind buffer(s) (if not currently bound)
    update uniforms
    draw
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