Commit Graph

2 Commits

Author SHA1 Message Date
Kirill Chibisov 673710487a
Extract `SizeInfo` from alacritty_terminal
The `SizeInfo` is a SizeInfo used for rendering, which contains
information about padding, and such, however all the terminal need is
number of visible lines and columns.
2022-04-06 13:06:39 +03:00
Kirill Chibisov 1880522b64
Add fallback GLES2 renderer
Currently Alacritty only works on hardware which supports OpenGL 3.3 or
more, which can become problematic with older devices. This patch adds a
new GLES2 renderer, since it is much more widely supported, especially
on weaker hardware like phones or a Raspberry Pi.

While the GLES2 renderer is slower than the OpenGL 3.3+ version, it is
still significantly faster than software rendering. However because of
this performance difference it is only used when necessary and there
should be no difference for machines supporting OpenGL 3.3+.

The two renderers are largely independent and separated in the
`renderer/text/glsl3` and `renderer/text/gles2` modules. Separate
shaders are also required for text rendering. The rectangle rendering
for underlines and the visual bell works identically for both versions,
but does have some version-specific shader code.

Fixes #128.

Co-authored-by: Christian Duerr <contact@christianduerr.com>
2022-03-02 10:05:12 +00:00