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

Simplified updating interface and caching improvements #12

Open
wants to merge 9 commits into
base: master
Choose a base branch
from

Conversation

mikolalysenko
Copy link
Member

This change set replaces .updateExports() with a simpler method called .update(). This new method takes a new vertex/fragment shader runs them.

If there is a down vote on this, then I will merge this change set into gl-shader.

Longer term, I think that maybe glslify should move to sourceOnly as the default and only option, then the particular choice of shader wrapper wouldn't matter as much.

@mikolalysenko
Copy link
Member Author

Summary of changes:

  • Change handle to program
  • Implement caching and reference counting for shader objects (improves performance when attribute locations are changed)
  • Remove .updateExports()
  • Add a new .update() method which reruns the constructor (similar to behavior from gl-buffer, gl-fbo, etc.)
  • Fix a bug with attribute locations not working correctly
  • Make default attribute locations deterministic across different WebGL implementations
  • Add an option for using runtime reflection to load uniforms/attributes if not specified by glslify or otherwise

@mikolalysenko mikolalysenko changed the title Rewrite source Simplified updating interface and caching improvements Dec 6, 2014
@mikolalysenko mikolalysenko mentioned this pull request Dec 9, 2014
15 tasks
@hughsk
Copy link
Member

hughsk commented Dec 9, 2014

Looks good to me! :)

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

Successfully merging this pull request may close these issues.

2 participants