Skip to content

Ergonomics: more cleanly handle non-sprite shaders #490

Open
@adroitwhiz

Description

@adroitwhiz

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).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions