aboutsummaryrefslogtreecommitdiff
path: root/src/renderer
diff options
context:
space:
mode:
authorJoe Wilm <joe@jwilm.com>2016-06-28 09:18:54 -0700
committerJoe Wilm <joe@jwilm.com>2016-06-28 09:18:54 -0700
commit69ed81d2495c6eb548c44e73c0e9ed359d3820f0 (patch)
treec12611c50799452ee99ca03b7097dab1780dd27e /src/renderer
parent8454bbe18340208286572a01e32f2d1a84440308 (diff)
downloadalacritty-69ed81d2495c6eb548c44e73c0e9ed359d3820f0.tar.gz
alacritty-69ed81d2495c6eb548c44e73c0e9ed359d3820f0.zip
Refactor Tty and Grid creation into Term::new
This moves more logic out of main() and prepares the Term type to handle resizing. By providing all size data to Term, it is now possible to implement a resize function there which handles all resizing logic save for the rendering subsystem.
Diffstat (limited to 'src/renderer')
-rw-r--r--src/renderer/mod.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/renderer/mod.rs b/src/renderer/mod.rs
index dff20070..9df4052d 100644
--- a/src/renderer/mod.rs
+++ b/src/renderer/mod.rs
@@ -17,7 +17,7 @@ use font::{Rasterizer, RasterizedGlyph, FontDesc};
use grid::{self, Grid, Cell, CellFlags};
use term;
-use super::{Rgb, TermProps};
+use super::Rgb;
static TEXT_SHADER_F_PATH: &'static str = concat!(env!("CARGO_MANIFEST_DIR"), "/res/text.f.glsl");
static TEXT_SHADER_V_PATH: &'static str = concat!(env!("CARGO_MANIFEST_DIR"), "/res/text.v.glsl");
@@ -423,7 +423,7 @@ impl QuadRenderer {
renderer
}
- pub fn with_api<F>(&mut self, props: &TermProps, mut func: F)
+ pub fn with_api<F>(&mut self, props: &term::SizeInfo, mut func: F)
where F: FnMut(RenderApi)
{
if self.should_reload.load(Ordering::Relaxed) {
@@ -681,7 +681,7 @@ impl ShaderProgram {
Ok(shader)
}
- fn set_term_uniforms(&self, props: &TermProps) {
+ fn set_term_uniforms(&self, props: &term::SizeInfo) {
unsafe {
gl::Uniform2f(self.u_term_dim, props.width, props.height);
gl::Uniform2f(self.u_cell_dim, props.cell_width, props.cell_height);