Which means it can be disabled in release builds. No more working on a
renderer feature and actually breaking the Alacritty your editor is
running inside.
Per-instanced data was previously stored in uniforms. This required
several OpenGL calls to upload all of the data, and it was more complex
to prepare (several vecs vs one).
Additionally, drawing APIs are now accessible through a `RenderApi`
(obtained through `QuadRenderer::with_api`) which enables some RAII
patterns. Specifically, checks for batch flushing are handled in Drop.
This patch introduces basic support for terminal emulation. Basic means
commands that don't use paging and are not full screen applications like
vim or tmux. Some paging applications are working properly, such as as
`git log`. Other pagers work reasonably well as long as the help menu is
not accessed.
There is now a central Rgb color type which is shared by the renderer,
terminal emulation, and the pty parser.
The parser no longer owns a Handler. Instead, a mutable reference to a
Handler is provided whenever advancing the parser. This resolved some
potential ownership issues (eg parser owning the `Term` type would've
been unworkable).
Uses the GL_ARB_blend_func_extended to get single-pass, per-channel
alpha blending. gl_generator is now used instead of gl to enable the
extension.
The background color is removed since that presumably needs to run in a
separate pass.
OpenGL only supports shared alpha blending. Subpixel font rendering
requires using the font RGB values as alpha masks for the corresponding
RGB channels. To support this, blending is implemented in the fragment
shader.
- Commend vertex slice
- Add helper for binding mask texture (and specify that it's a mask)
- Prefix uniform members of ShaderProgram with u_. This makes it easy to
identify in the rest of code.