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:
parent
77cfb7b5cd
commit
97c1a17bf1
1 changed files with 6 additions and 21 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue