Fixed some imports/documentation.
This commit is contained in:
parent
9c7bf417ac
commit
72feba51be
3 changed files with 4 additions and 7 deletions
|
|
@ -10,14 +10,14 @@ use iced::application;
|
||||||
use iced::executor;
|
use iced::executor;
|
||||||
use iced::theme::{self, Theme};
|
use iced::theme::{self, Theme};
|
||||||
use iced::time;
|
use iced::time;
|
||||||
use iced::widget::canvas::{self, stroke, Cursor, Path, Stroke};
|
use iced::widget::canvas;
|
||||||
|
use iced::widget::canvas::{Cursor, Path, Stroke, Fill, fill, Gradient, stroke};
|
||||||
use iced::window;
|
use iced::window;
|
||||||
use iced::{
|
use iced::{
|
||||||
Application, Color, Command, Element, Length, Point, Rectangle, Settings,
|
Application, Color, Command, Element, Length, Point, Rectangle, Settings,
|
||||||
Size, Subscription, Vector,
|
Size, Subscription, Vector,
|
||||||
};
|
};
|
||||||
|
|
||||||
use crate::canvas::{fill, Fill, Gradient};
|
|
||||||
use std::time::Instant;
|
use std::time::Instant;
|
||||||
|
|
||||||
pub fn main() -> iced::Result {
|
pub fn main() -> iced::Result {
|
||||||
|
|
|
||||||
|
|
@ -42,6 +42,7 @@ impl Builder {
|
||||||
self.valid = false;
|
self.valid = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//TODO: can sort on insert here
|
||||||
self.stops.push((offset, color));
|
self.stops.push((offset, color));
|
||||||
self
|
self
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -101,8 +101,7 @@ impl Pipeline {
|
||||||
//count the total amount of vertices & indices we need to handle
|
//count the total amount of vertices & indices we need to handle
|
||||||
let (total_vertices, total_indices) = attribute_count_of(meshes);
|
let (total_vertices, total_indices) = attribute_count_of(meshes);
|
||||||
|
|
||||||
// Then we ensure the current attribute buffers are big enough, resizing if necessary
|
// Then we ensure the current attribute buffers are big enough, resizing if necessary.
|
||||||
// with wgpu this means recreating the buffer.
|
|
||||||
|
|
||||||
//We are not currently using the return value of these functions as we have no system in
|
//We are not currently using the return value of these functions as we have no system in
|
||||||
//place to calculate mesh diff, or to know whether or not that would be more performant for
|
//place to calculate mesh diff, or to know whether or not that would be more performant for
|
||||||
|
|
@ -190,9 +189,6 @@ impl Pipeline {
|
||||||
depth_stencil_attachment: None,
|
depth_stencil_attachment: None,
|
||||||
});
|
});
|
||||||
|
|
||||||
//TODO I can't figure out a clean way to encapsulate these into their appropriate
|
|
||||||
// structs without displeasing the borrow checker due to the lifetime requirements of
|
|
||||||
// render_pass & using a mutable reference to each pipeline in a loop...
|
|
||||||
let mut num_solids = 0;
|
let mut num_solids = 0;
|
||||||
let mut num_gradients = 0;
|
let mut num_gradients = 0;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue