diff options
author | Joe Wilm <joe@jwilm.com> | 2016-05-30 20:44:37 -0700 |
---|---|---|
committer | Joe Wilm <joe@jwilm.com> | 2016-06-02 19:42:28 -0700 |
commit | 30ec14510935d46e7454863f9a4e63e53bf7728c (patch) | |
tree | 9501fe70ecf582e57903fbc061d3e6a0928f3f33 /res | |
parent | 70b0423a31016798592fc0e96ce316cb3f1e9d46 (diff) |
Initial support for Terminal Emulation (woo!)
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).
Diffstat (limited to 'res')
-rw-r--r-- | res/text.f.glsl | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/res/text.f.glsl b/res/text.f.glsl index 3389fd7e..e817626f 100644 --- a/res/text.f.glsl +++ b/res/text.f.glsl @@ -5,10 +5,11 @@ layout(location = 0, index = 0) out vec4 color; layout(location = 0, index = 1) out vec4 alphaMask; uniform sampler2D mask; -uniform vec3 textColor; +uniform ivec3 textColor; void main() { - alphaMask = vec4(texture(mask, TexCoords).rgb, 1.); - color = vec4(textColor, 1.); + alphaMask = vec4(texture(mask, TexCoords).rgb, 1.0); + vec3 textColorF = vec3(textColor) / vec3(255.0, 255.0, 255.0); + color = vec4(textColorF, 1.0); } |