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

Immediate Mode / VertBatch performance could be improved by reusing gl buffers #718

Open
richardeakin opened this issue Feb 20, 2015 · 0 comments
Labels

Comments

@richardeakin
Copy link
Collaborator

After reading this discussion that compares the performance of drawing in immediate mode in 0.8.6 and glNext, I did some profiling to find out where the slow down was. For me using Instruments / Time Profiler to be > 50% in the destruction of the Vbo, and also another 5% in destroying the VAO:

screen shot 2015-02-20 at 1 31 11 am

So, I did a quick hack (see here) so that those gl buffers are reused, and I saw a significant performance improvement:

screen shot 2015-02-20 at 2 03 54 am

While still not as good as 0.8.6, and would surely take a bit more thought to cover all of the cases, it seems worth the effort in that using something like gl::begin( GL_LINES ) is very common - we even use this in BasicApp, pretty much the first piece of cinder sample code that a new user will see.

Test app is the same as in the discussion, from this gist.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant