mirror of
https://github.com/emilk/egui.git
synced 2026-08-31 05:40:03 -04:00
Draw lines
This commit is contained in:
@@ -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,
|
||||
|
||||
@@ -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());
|
||||
|
||||
Reference in New Issue
Block a user