1
0
Fork 0

Upgrade dependencies

main
rahix 3 years ago
parent 8d9498939f
commit 94d554ed8d

3068
Cargo.lock generated

File diff suppressed because it is too large Load Diff

@ -5,16 +5,16 @@ name = "ggparty-2019"
version = "0.1.0" version = "0.1.0"
[dependencies] [dependencies]
glium = "0.22.0" glium = "0.32.1"
image = "0.20.1" image = "0.24.5"
log = "0.4.6" log = "0.4.17"
nalgebra = "0.16.9" nalgebra = "0.32.1"
rand = "0.6.0-pre.1" rand = "0.8.5"
ezconf = "0.3.0" ezconf = "0.3.0"
[dependencies.vis-core] [dependencies.vis-core]
git = "https://github.com/Rahix/visualizer2" git = "https://github.com/Rahix/visualizer2"
rev = "a237bb423e3a278a29a25649a7274d3430815596" rev = "a5878b86b2dacdc499ffad2247669834a14b719f"
features = ["cpalrecord", "pulseaudio"] features = ["cpalrecord", "pulseaudio"]
[profile.release] [profile.release]

@ -7,6 +7,8 @@ extern crate nalgebra as na;
use glium::glutin; use glium::glutin;
use vis_core::analyzer; use vis_core::analyzer;
use glutin::platform::run_return::EventLoopExtRunReturn;
macro_rules! shader_program { macro_rules! shader_program {
// {{{ // {{{
($display:expr, $vert_file:expr, $frag_file:expr) => {{ ($display:expr, $vert_file:expr, $frag_file:expr) => {{
@ -160,15 +162,17 @@ fn main() {
// }}} // }}}
// Window Initialization {{{ // Window Initialization {{{
let mut events_loop = glutin::EventsLoop::new(); let mut events_loop = glutin::event_loop::EventLoop::new();
let window = glutin::WindowBuilder::new() let window = glutin::window::WindowBuilder::new()
.with_dimensions(glutin::dpi::LogicalSize::new( .with_inner_size(glutin::dpi::LogicalSize::new(
window_width as f64, window_width as f64,
window_height as f64, window_height as f64,
)) ))
.with_maximized(true) .with_maximized(true)
.with_decorations(false) .with_decorations(false)
.with_fullscreen(Some(events_loop.get_primary_monitor())) .with_fullscreen(Some(glutin::window::Fullscreen::Borderless(Some(
events_loop.primary_monitor().expect("No primary monitor"),
))))
.with_title("Visualizer2 - NoAmbition"); .with_title("Visualizer2 - NoAmbition");
let context = glutin::ContextBuilder::new() let context = glutin::ContextBuilder::new()
@ -343,10 +347,10 @@ fn main() {
// Image {{{ // Image {{{
let image = image::load( let image = image::load(
std::io::Cursor::new(&include_bytes!("logo.png")[..]), std::io::Cursor::new(&include_bytes!("logo.png")[..]),
image::PNG, image::ImageFormat::Png,
) )
.unwrap() .unwrap()
.to_rgba(); .to_rgba8();
let image_dims = image.dimensions(); let image_dims = image.dimensions();
let image = glium::texture::RawImage2d::from_raw_rgba_reversed(&image.into_raw(), image_dims); let image = glium::texture::RawImage2d::from_raw_rgba_reversed(&image.into_raw(), image_dims);
let c3_texture = glium::texture::CompressedSrgbTexture2d::new(&display, image).unwrap(); let c3_texture = glium::texture::CompressedSrgbTexture2d::new(&display, image).unwrap();
@ -618,13 +622,14 @@ fn main() {
// Events {{{ // Events {{{
let mut closed = false; let mut closed = false;
events_loop.poll_events(|ev| match ev { events_loop.run_return(|ev, _, control_flow| {
glutin::Event::WindowEvent { event, .. } => match event { match ev {
glutin::WindowEvent::CloseRequested => closed = true, glutin::event::Event::WindowEvent { event, .. } => match event {
glutin::WindowEvent::KeyboardInput { glutin::event::WindowEvent::CloseRequested => closed = true,
glutin::event::WindowEvent::KeyboardInput {
input: input:
glutin::KeyboardInput { glutin::event::KeyboardInput {
virtual_keycode: Some(glutin::VirtualKeyCode::Escape), virtual_keycode: Some(glutin::event::VirtualKeyCode::Escape),
.. ..
}, },
.. ..
@ -632,6 +637,8 @@ fn main() {
_ => (), _ => (),
}, },
_ => (), _ => (),
}
*control_flow = glutin::event_loop::ControlFlow::Exit;
}); });
if closed { if closed {
break 'main; break 'main;

Loading…
Cancel
Save