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"
[dependencies]
glium = "0.22.0"
image = "0.20.1"
log = "0.4.6"
nalgebra = "0.16.9"
rand = "0.6.0-pre.1"
glium = "0.32.1"
image = "0.24.5"
log = "0.4.17"
nalgebra = "0.32.1"
rand = "0.8.5"
ezconf = "0.3.0"
[dependencies.vis-core]
git = "https://github.com/Rahix/visualizer2"
rev = "a237bb423e3a278a29a25649a7274d3430815596"
rev = "a5878b86b2dacdc499ffad2247669834a14b719f"
features = ["cpalrecord", "pulseaudio"]
[profile.release]

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

Loading…
Cancel
Save