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

Reduce redundant GL state changes. #524

Open
roboman2444 opened this issue Jan 4, 2017 · 0 comments
Open

Reduce redundant GL state changes. #524

roboman2444 opened this issue Jan 4, 2017 · 0 comments
Labels
enhancement request/proposal to add a new feature performance renderer

Comments

@roboman2444
Copy link
Contributor

Adding a little check like
if(curprogram == wantedprogram) return;
can sometimes help performance.

I might submit a pull request in a day or two that does this if I have time.

Also, using a "state manager" might make it easier to program with.

output of gloverrides:
81 frames in 1006.950012 milliseconds = 80.440933 fps
State status:
glActiveTexture redundant/total: 0/0
glAlphaFunc redundant/total: 0/0
glBindTexture redundant/total: 4241/50027
glBindVertexArray redundant/total: 0/0
glBlendFunc redundant/total: 567/891
glColor* redundant/total: 0/0
glCullFace redundant/total: 0/0
glDepthFunc redundant/total: 324/810
glDepthMask redundant/total: 162/486
glUseProgram redundant/total: 7142/10301

@yvt yvt added performance enhancement request/proposal to add a new feature renderer labels Jan 4, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement request/proposal to add a new feature performance renderer
Projects
None yet
Development

No branches or pull requests

2 participants