Skip to content

Ergonomics: more cleanly handle non-sprite shaders #490

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

Open
adroitwhiz opened this issue Aug 6, 2019 · 0 comments
Open

Ergonomics: more cleanly handle non-sprite shaders #490

adroitwhiz opened this issue Aug 6, 2019 · 0 comments

Comments

@adroitwhiz
Copy link
Contributor

Currently, the ShaderManager is geared towards compiling shaders for drawing sprites. However, the PenSkin uses an entirely non-sprite-related shader to draw lines, and PR #489 adds another non-sprite shader in order to be able to draw backgrounds that are properly masked by the stencil buffer.

Currently, these are handled as "draw modes", but this seems hacky. Code for drawing everything is all in sprite.vert and sprite.frag. Perhaps "draw mode" should be split into two parts: "primitive mode" (are we drawing a sprite, line, background, etc) and "draw options" (how are we drawing it).

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