1
0
mirror of https://github.com/emilk/egui.git synced 2026-08-31 05:40:03 -04:00

Draw lines

This commit is contained in:
Emil Ernerfeldt
2019-01-05 16:23:40 +01:00
parent aa1c53f707
commit cf495be002
5 changed files with 163 additions and 113 deletions

View File

@@ -18,7 +18,7 @@ pub struct App {
impl Default for App {
fn default() -> App {
App {
checked: false,
checked: true,
selected_alternative: 0,
count: 0,
width: 100.0,

View File

@@ -141,10 +141,10 @@ impl Painter {
let mut positions: Vec<f32> = Vec::with_capacity(2 * frame.vertices.len());
let mut tex_coords: Vec<u16> = Vec::with_capacity(2 * frame.vertices.len());
for v in &frame.vertices {
positions.push(v.x);
positions.push(v.y);
tex_coords.push(v.u);
tex_coords.push(v.v);
positions.push(v.pos.x);
positions.push(v.pos.y);
tex_coords.push(v.uv.0);
tex_coords.push(v.uv.1);
}
let mut colors: Vec<u8> = Vec::with_capacity(4 * frame.vertices.len());