1
0
Fork 0
mirror of https://github.com/alacritty/alacritty.git synced 2024-11-03 04:34:21 -05:00

Cleanup PackedVertex initialization

This commit is contained in:
Joe Wilm 2016-02-27 13:15:42 -08:00
parent 77cfb7b5cd
commit 97c1a17bf1

View file

@ -102,27 +102,12 @@ impl QuadRenderer {
let rect = get_rect(glyph, x, y);
// Top right, Bottom right, Bottom left, Top left
let packed = [PackedVertex {
x: rect.max_x(),
y: rect.max_y(),
u: 1.0,
v: 0.0,
}, PackedVertex {
x: rect.max_x(),
y: rect.min_y(),
u: 1.0,
v: 1.0,
}, PackedVertex {
x: rect.min_x(),
y: rect.min_y(),
u: 0.0,
v: 1.0,
}, PackedVertex {
x: rect.min_x(),
y: rect.max_y(),
u: 0.0,
v: 0.0,
}];
let packed = [
PackedVertex { x: rect.max_x(), y: rect.max_y(), u: 1.0, v: 0.0, },
PackedVertex { x: rect.max_x(), y: rect.min_y(), u: 1.0, v: 1.0, },
PackedVertex { x: rect.min_x(), y: rect.min_y(), u: 0.0, v: 1.0, },
PackedVertex { x: rect.min_x(), y: rect.max_y(), u: 0.0, v: 0.0, },
];
unsafe {
bind_mask_texture(glyph.tex_id);