update winit
This commit is contained in:
parent
2219bc41dd
commit
488b307cc3
13 changed files with 7 additions and 14 deletions
|
@ -5,7 +5,7 @@ edition = "2021"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
winit = "*"
|
winit = "*"
|
||||||
softbuffer = "0.4.2"
|
softbuffer = "0.4.6"
|
||||||
cgmath = "*"
|
cgmath = "*"
|
||||||
prisma = "0.1.1"
|
prisma = "0.1.1"
|
||||||
angular-units = "*"
|
angular-units = "*"
|
||||||
|
|
|
@ -6,7 +6,6 @@ use {
|
||||||
std::rc::Rc,
|
std::rc::Rc,
|
||||||
winit::event::{Event, WindowEvent},
|
winit::event::{Event, WindowEvent},
|
||||||
winit::event_loop::{ControlFlow, EventLoop},
|
winit::event_loop::{ControlFlow, EventLoop},
|
||||||
winit::window::WindowBuilder,
|
|
||||||
prisma::{Rgb,Hsv,FromColor, Lerp},
|
prisma::{Rgb,Hsv,FromColor, Lerp},
|
||||||
cgmath::{Point2, Vector2},
|
cgmath::{Point2, Vector2},
|
||||||
std::time::Duration,
|
std::time::Duration,
|
||||||
|
@ -42,7 +41,12 @@ use crate::{
|
||||||
#[async_std::main]
|
#[async_std::main]
|
||||||
async fn main() {
|
async fn main() {
|
||||||
let event_loop = EventLoop::new().unwrap();
|
let event_loop = EventLoop::new().unwrap();
|
||||||
let window = Arc::new(WindowBuilder::new().build(&event_loop).unwrap());
|
|
||||||
|
let window = event_loop.create_window(
|
||||||
|
winit::window::Window::default_attributes()
|
||||||
|
.with_title("Fragmental Light Controller")
|
||||||
|
).expect("create window");
|
||||||
|
let window = Arc::new(window);
|
||||||
let context = softbuffer::Context::new(window.clone()).unwrap();
|
let context = softbuffer::Context::new(window.clone()).unwrap();
|
||||||
let mut surface = Arc::new(Mutex::new(softbuffer::Surface::new(&context, window.clone()).unwrap()));
|
let mut surface = Arc::new(Mutex::new(softbuffer::Surface::new(&context, window.clone()).unwrap()));
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,6 @@ use {
|
||||||
std::rc::Rc,
|
std::rc::Rc,
|
||||||
winit::event::{Event, WindowEvent},
|
winit::event::{Event, WindowEvent},
|
||||||
winit::event_loop::{ControlFlow, EventLoop},
|
winit::event_loop::{ControlFlow, EventLoop},
|
||||||
winit::window::WindowBuilder,
|
|
||||||
prisma::{Rgb,Hsv,FromColor, Lerp},
|
prisma::{Rgb,Hsv,FromColor, Lerp},
|
||||||
cgmath::{Point2, Vector2},
|
cgmath::{Point2, Vector2},
|
||||||
std::time::Duration,
|
std::time::Duration,
|
||||||
|
|
|
@ -4,7 +4,6 @@ use {
|
||||||
std::rc::Rc,
|
std::rc::Rc,
|
||||||
winit::event::{Event, WindowEvent},
|
winit::event::{Event, WindowEvent},
|
||||||
winit::event_loop::{ControlFlow, EventLoop},
|
winit::event_loop::{ControlFlow, EventLoop},
|
||||||
winit::window::WindowBuilder,
|
|
||||||
prisma::{Rgb,Hsv,FromColor, Lerp},
|
prisma::{Rgb,Hsv,FromColor, Lerp},
|
||||||
cgmath::{Point2, Vector2},
|
cgmath::{Point2, Vector2},
|
||||||
std::time::Duration,
|
std::time::Duration,
|
||||||
|
|
|
@ -4,7 +4,6 @@ use {
|
||||||
std::rc::Rc,
|
std::rc::Rc,
|
||||||
winit::event::{Event, WindowEvent},
|
winit::event::{Event, WindowEvent},
|
||||||
winit::event_loop::{ControlFlow, EventLoop},
|
winit::event_loop::{ControlFlow, EventLoop},
|
||||||
winit::window::WindowBuilder,
|
|
||||||
prisma::{Rgb,Hsv,FromColor, Lerp},
|
prisma::{Rgb,Hsv,FromColor, Lerp},
|
||||||
cgmath::{Point2, Vector2},
|
cgmath::{Point2, Vector2},
|
||||||
std::time::Duration,
|
std::time::Duration,
|
||||||
|
|
|
@ -4,7 +4,6 @@ use {
|
||||||
std::rc::Rc,
|
std::rc::Rc,
|
||||||
winit::event::{Event, WindowEvent},
|
winit::event::{Event, WindowEvent},
|
||||||
winit::event_loop::{ControlFlow, EventLoop},
|
winit::event_loop::{ControlFlow, EventLoop},
|
||||||
winit::window::WindowBuilder,
|
|
||||||
prisma::{Rgb,Hsv,FromColor, Lerp},
|
prisma::{Rgb,Hsv,FromColor, Lerp},
|
||||||
cgmath::{Point2, Vector2},
|
cgmath::{Point2, Vector2},
|
||||||
std::time::Duration,
|
std::time::Duration,
|
||||||
|
|
|
@ -4,7 +4,6 @@ use {
|
||||||
std::rc::Rc,
|
std::rc::Rc,
|
||||||
winit::event::{Event, WindowEvent},
|
winit::event::{Event, WindowEvent},
|
||||||
winit::event_loop::{ControlFlow, EventLoop},
|
winit::event_loop::{ControlFlow, EventLoop},
|
||||||
winit::window::WindowBuilder,
|
|
||||||
prisma::{Rgb,Hsv,FromColor, Lerp},
|
prisma::{Rgb,Hsv,FromColor, Lerp},
|
||||||
cgmath::{Point2, Vector2},
|
cgmath::{Point2, Vector2},
|
||||||
std::time::Duration,
|
std::time::Duration,
|
||||||
|
|
|
@ -4,7 +4,6 @@ use {
|
||||||
std::rc::Rc,
|
std::rc::Rc,
|
||||||
winit::event::{Event, WindowEvent},
|
winit::event::{Event, WindowEvent},
|
||||||
winit::event_loop::{ControlFlow, EventLoop},
|
winit::event_loop::{ControlFlow, EventLoop},
|
||||||
winit::window::WindowBuilder,
|
|
||||||
prisma::{Rgb,Hsv,FromColor, Lerp},
|
prisma::{Rgb,Hsv,FromColor, Lerp},
|
||||||
cgmath::{Point2, Vector2},
|
cgmath::{Point2, Vector2},
|
||||||
std::time::Duration,
|
std::time::Duration,
|
||||||
|
|
|
@ -4,7 +4,6 @@ use {
|
||||||
std::rc::Rc,
|
std::rc::Rc,
|
||||||
winit::event::{Event, WindowEvent},
|
winit::event::{Event, WindowEvent},
|
||||||
winit::event_loop::{ControlFlow, EventLoop},
|
winit::event_loop::{ControlFlow, EventLoop},
|
||||||
winit::window::WindowBuilder,
|
|
||||||
prisma::{Rgb,Hsv,FromColor, Lerp},
|
prisma::{Rgb,Hsv,FromColor, Lerp},
|
||||||
cgmath::{Point2, Vector2},
|
cgmath::{Point2, Vector2},
|
||||||
std::time::Duration,
|
std::time::Duration,
|
||||||
|
|
|
@ -4,7 +4,6 @@ use {
|
||||||
std::rc::Rc,
|
std::rc::Rc,
|
||||||
winit::event::{Event, WindowEvent},
|
winit::event::{Event, WindowEvent},
|
||||||
winit::event_loop::{ControlFlow, EventLoop},
|
winit::event_loop::{ControlFlow, EventLoop},
|
||||||
winit::window::WindowBuilder,
|
|
||||||
prisma::{Rgb,Hsv,FromColor, Lerp},
|
prisma::{Rgb,Hsv,FromColor, Lerp},
|
||||||
cgmath::{Point2, Vector2},
|
cgmath::{Point2, Vector2},
|
||||||
std::time::Duration,
|
std::time::Duration,
|
||||||
|
|
|
@ -4,7 +4,6 @@ use {
|
||||||
std::rc::Rc,
|
std::rc::Rc,
|
||||||
winit::event::{Event, WindowEvent},
|
winit::event::{Event, WindowEvent},
|
||||||
winit::event_loop::{ControlFlow, EventLoop},
|
winit::event_loop::{ControlFlow, EventLoop},
|
||||||
winit::window::WindowBuilder,
|
|
||||||
prisma::{Rgb,Hsv,FromColor, Lerp},
|
prisma::{Rgb,Hsv,FromColor, Lerp},
|
||||||
cgmath::{Point2, Vector2},
|
cgmath::{Point2, Vector2},
|
||||||
std::time::Duration,
|
std::time::Duration,
|
||||||
|
|
|
@ -4,7 +4,6 @@ use {
|
||||||
std::rc::Rc,
|
std::rc::Rc,
|
||||||
winit::event::{Event, WindowEvent},
|
winit::event::{Event, WindowEvent},
|
||||||
winit::event_loop::{ControlFlow, EventLoop},
|
winit::event_loop::{ControlFlow, EventLoop},
|
||||||
winit::window::WindowBuilder,
|
|
||||||
prisma::{Rgb,Hsv,FromColor, Lerp},
|
prisma::{Rgb,Hsv,FromColor, Lerp},
|
||||||
cgmath::{Point2, Vector2},
|
cgmath::{Point2, Vector2},
|
||||||
std::time::Duration,
|
std::time::Duration,
|
||||||
|
|
|
@ -4,7 +4,6 @@ use {
|
||||||
std::rc::Rc,
|
std::rc::Rc,
|
||||||
winit::event::{Event, WindowEvent},
|
winit::event::{Event, WindowEvent},
|
||||||
winit::event_loop::{ControlFlow, EventLoop},
|
winit::event_loop::{ControlFlow, EventLoop},
|
||||||
winit::window::WindowBuilder,
|
|
||||||
prisma::{Rgb,Hsv,FromColor, Lerp},
|
prisma::{Rgb,Hsv,FromColor, Lerp},
|
||||||
cgmath::{Point2, Vector2},
|
cgmath::{Point2, Vector2},
|
||||||
std::time::Duration,
|
std::time::Duration,
|
||||||
|
|
Loading…
Reference in a new issue