Re-organize custom module as pipeline module

... and move `Shader` widget to `iced_widget` crate
This commit is contained in:
Héctor Ramón Jiménez 2023-11-14 12:49:49 +01:00
parent 2dda9132cd
commit 9489e29e66
No known key found for this signature in database
GPG key ID: 7CC46565708259A7
14 changed files with 246 additions and 197 deletions

View file

@ -3,15 +3,20 @@ mod cubes;
mod pipeline;
mod primitive;
use crate::camera::Camera;
use crate::cubes::Cubes;
use crate::pipeline::Pipeline;
use iced::executor;
use iced::time::Instant;
use iced::widget::{
checkbox, column, container, row, slider, text, vertical_space, Shader,
};
use iced::window;
use iced::{
executor, window, Alignment, Application, Color, Command, Element, Length,
Renderer, Subscription, Theme,
Alignment, Application, Color, Command, Element, Length, Renderer,
Subscription, Theme,
};
use std::time::Instant;
fn main() -> iced::Result {
IcedCubes::run(iced::Settings::default())

View file

@ -4,17 +4,18 @@ pub mod vertex;
mod buffer;
mod uniforms;
use crate::camera::Camera;
use crate::pipeline::Pipeline;
use crate::primitive::cube::Cube;
pub use buffer::Buffer;
pub use cube::Cube;
pub use uniforms::Uniforms;
pub use vertex::Vertex;
use crate::Camera;
use crate::Pipeline;
use iced::advanced::graphics::Transformation;
use iced::widget::shader;
use iced::{Color, Rectangle, Size};
pub use crate::primitive::vertex::Vertex;
pub use buffer::Buffer;
pub use uniforms::Uniforms;
/// A collection of `Cube`s that can be rendered.
#[derive(Debug)]
pub struct Primitive {