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 /src/renderer/mod.rs | |
parent | 70b0423a31016798592fc0e96ce316cb3f1e9d46 (diff) | |
download | alacritty-30ec14510935d46e7454863f9a4e63e53bf7728c.tar.gz alacritty-30ec14510935d46e7454863f9a4e63e53bf7728c.zip |
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 'src/renderer/mod.rs')
-rw-r--r-- | src/renderer/mod.rs | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/src/renderer/mod.rs b/src/renderer/mod.rs index b88357b3..9495d8a0 100644 --- a/src/renderer/mod.rs +++ b/src/renderer/mod.rs @@ -32,12 +32,7 @@ pub struct PackedVertex { v: f32, } -#[derive(Debug)] -pub struct Rgb { - pub r: f32, - pub g: f32, - pub b: f32, -} +use super::Rgb; impl QuadRenderer { // TODO should probably hand this a transform instead of width/height @@ -103,7 +98,7 @@ impl QuadRenderer { self.program.activate(); unsafe { // set color - gl::Uniform3f(self.program.u_color, color.r, color.g, color.b); + gl::Uniform3i(self.program.u_color, color.r as i32, color.g as i32, color.b as i32); } let rect = get_rect(glyph, x, y); |