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

Warn about rapidly switching between n programs #14

Open
sgrove opened this issue Jun 1, 2015 · 1 comment
Open

Warn about rapidly switching between n programs #14

sgrove opened this issue Jun 1, 2015 · 1 comment

Comments

@sgrove
Copy link
Contributor

sgrove commented Jun 1, 2015

Likely GD needs to have configurable warnings for dev and prod, which is a separate issue, but this is a big one for performance.

If in drawing one frame we gl.useProgram X, gl.useProgram Y, and then at any later point in drawing that frame call gl.useProgram X again, GD should issue a (one time per program run?) warning that it's more efficient to batch all draw calls by program, and highlight that we've useProgram'd X (likely a case for a :name or :id key on programs for debugging) at least twice in one frame. Help newbs (like yours truly) avoid making obvious perf mistakes, especially ones that they may not be aware of.

@kovasb
Copy link
Owner

kovasb commented Jun 1, 2015

I'd prefer to have a separate "logging" driver, and then forms of analysis over that log, rather than put this kind of logic into the basic driver.

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

2 participants