Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update egui to 0.29 and winit to 0.30 #197

Merged
merged 4 commits into from
Nov 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ base64 = "0.21"
bitflags = "2"
bytemuck = { version = "1", features = ["derive"] }
choir = "0.7"
egui = "0.28"
egui = "0.29"
glam = { version = "0.27", features = ["mint"] }
gltf = { version = "1.1", default-features = false }
log = "0.4"
Expand All @@ -29,7 +29,7 @@ profiling = "1"
slab = "0.4"
strum = { version = "0.25", features = ["derive"] }
web-sys = "0.3.60"
winit = "0.29"
winit = "0.30"

[lib]

Expand Down Expand Up @@ -75,7 +75,7 @@ blade-macros = { version = "0.3", path = "blade-macros" }
bytemuck = { workspace = true }
choir = { workspace = true }
egui = { workspace = true }
transform-gizmo-egui = { git = "https://github.com/urholaukkarinen/transform-gizmo", rev = "5be085444468ff7059abcd4e4872ab4510f65a06" }
transform-gizmo-egui = { git = "https://github.com/urholaukkarinen/transform-gizmo", rev = "7556fb38b37f3772c57dd0fae6a276976d314f9b" }
env_logger = "0.11"
glam = { workspace = true }
log = { workspace = true }
Expand All @@ -91,7 +91,7 @@ del-geo = "=0.1.29"

[target.'cfg(not(target_arch = "wasm32"))'.dev-dependencies]
# see https://github.com/emilk/egui/issues/4270
egui-winit = "0.28"
egui-winit = "0.29"

[target.'cfg(target_arch = "wasm32")'.dev-dependencies]
console_error_panic_hook = "0.1.7"
Expand Down
8 changes: 4 additions & 4 deletions examples/bunnymark/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -349,10 +349,10 @@
env_logger::init();

let event_loop = winit::event_loop::EventLoop::new().unwrap();
let window = winit::window::WindowBuilder::new()
.with_title("blade-bunnymark")
.build(&event_loop)
.unwrap();
let window_attributes =
winit::window::Window::default_attributes().with_title("blade-bunnymark");

let window = event_loop.create_window(window_attributes).unwrap();

Check warning on line 355 in examples/bunnymark/main.rs

View workflow job for this annotation

GitHub Actions / build (Linux, ubuntu-latest, x86_64-unknown-linux-gnu)

use of deprecated method `winit::event_loop::EventLoop::<T>::create_window`: use `ActiveEventLoop::create_window` instead

#[cfg(target_arch = "wasm32")]
{
Expand Down Expand Up @@ -380,7 +380,7 @@
let mut frame_count = 0;

event_loop
.run(|event, target| {

Check warning on line 383 in examples/bunnymark/main.rs

View workflow job for this annotation

GitHub Actions / build (Linux, ubuntu-latest, x86_64-unknown-linux-gnu)

use of deprecated method `winit::event_loop::EventLoop::<T>::run`: use `EventLoop::run_app` instead
target.set_control_flow(winit::event_loop::ControlFlow::Poll);
match event {
winit::event::Event::AboutToWait => {
Expand Down
10 changes: 5 additions & 5 deletions examples/move/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,10 @@
fn new(event_loop: &winit::event_loop::EventLoop<()>) -> Self {
log::info!("Initializing");

let window = winit::window::WindowBuilder::new()
.with_title("Move")
.build(event_loop)
.unwrap();
let window_attributes =
winit::window::Window::default_attributes().with_title("blade-move");

let window = event_loop.create_window(window_attributes).unwrap();

Check warning on line 40 in examples/move/main.rs

View workflow job for this annotation

GitHub Actions / build (Windows, windows-latest, x86_64-pc-windows-msvc)

use of deprecated method `winit::event_loop::EventLoop::<T>::create_window`: use `ActiveEventLoop::create_window` instead

Check warning on line 40 in examples/move/main.rs

View workflow job for this annotation

GitHub Actions / build (MacOS, macos-latest, x86_64-apple-darwin)

use of deprecated method `winit::event_loop::EventLoop::<T>::create_window`: use `ActiveEventLoop::create_window` instead

let camera = ControlledCamera {
inner: Camera {
Expand Down Expand Up @@ -89,7 +89,7 @@
let egui_context = egui::Context::default();
let egui_viewport_id = egui_context.viewport_id();
let egui_state =
egui_winit::State::new(egui_context, egui_viewport_id, &window, None, None);
egui_winit::State::new(egui_context, egui_viewport_id, &window, None, None, None);

Self {
engine,
Expand Down Expand Up @@ -267,7 +267,7 @@
let mut last_event = time::Instant::now();

event_loop
.run(|event, target| {

Check warning on line 270 in examples/move/main.rs

View workflow job for this annotation

GitHub Actions / build (Windows, windows-latest, x86_64-pc-windows-msvc)

use of deprecated method `winit::event_loop::EventLoop::<T>::run`: use `EventLoop::run_app` instead
let _delta = last_event.elapsed().as_secs_f32();
last_event = time::Instant::now();

Expand Down
10 changes: 5 additions & 5 deletions examples/particle/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -133,19 +133,19 @@
env_logger::init();

let event_loop = winit::event_loop::EventLoop::new().unwrap();
let window = winit::window::WindowBuilder::new()
.with_title("blade-particle")
.build(&event_loop)
.unwrap();
let window_attributes =
winit::window::Window::default_attributes().with_title("blade-particle");

let window = event_loop.create_window(window_attributes).unwrap();

let egui_ctx = egui::Context::default();
let viewport_id = egui_ctx.viewport_id();
let mut egui_winit = egui_winit::State::new(egui_ctx, viewport_id, &window, None, None);
let mut egui_winit = egui_winit::State::new(egui_ctx, viewport_id, &window, None, None, None);

let mut example = Example::new(&window);

event_loop
.run(|event, target| {

Check warning on line 148 in examples/particle/main.rs

View workflow job for this annotation

GitHub Actions / build (Linux, ubuntu-latest, x86_64-unknown-linux-gnu)

use of deprecated method `winit::event_loop::EventLoop::<T>::run`: use `EventLoop::run_app` instead

Check warning on line 148 in examples/particle/main.rs

View workflow job for this annotation

GitHub Actions / build (MacOS, macos-latest, x86_64-apple-darwin)

use of deprecated method `winit::event_loop::EventLoop::<T>::run`: use `EventLoop::run_app` instead
target.set_control_flow(winit::event_loop::ControlFlow::Poll);
match event {
winit::event::Event::AboutToWait => {
Expand Down
9 changes: 4 additions & 5 deletions examples/ray-query/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -328,11 +328,10 @@ fn main() {
env_logger::init();

let event_loop = winit::event_loop::EventLoop::new().unwrap();
let window = winit::window::WindowBuilder::new()
.with_title("blade-ray-query")
.with_transparent(true)
.build(&event_loop)
.unwrap();
let window_attributes =
winit::window::Window::default_attributes().with_title("blade-ray-query");

let window = event_loop.create_window(window_attributes).unwrap();

let mut example = Example::new(&window);

Expand Down
9 changes: 4 additions & 5 deletions examples/scene/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -792,14 +792,13 @@
env_logger::init();

let event_loop = winit::event_loop::EventLoop::new().unwrap();
let window = winit::window::WindowBuilder::new()
.with_title("blade-scene")
.build(&event_loop)
.unwrap();
let window_attributes = winit::window::Window::default_attributes().with_title("blade-scene");

let window = event_loop.create_window(window_attributes).unwrap();

Check warning on line 797 in examples/scene/main.rs

View workflow job for this annotation

GitHub Actions / build (Linux, ubuntu-latest, x86_64-unknown-linux-gnu)

use of deprecated method `winit::event_loop::EventLoop::<T>::create_window`: use `ActiveEventLoop::create_window` instead

Check warning on line 797 in examples/scene/main.rs

View workflow job for this annotation

GitHub Actions / build (Windows, windows-latest, x86_64-pc-windows-msvc)

use of deprecated method `winit::event_loop::EventLoop::<T>::create_window`: use `ActiveEventLoop::create_window` instead

Check warning on line 797 in examples/scene/main.rs

View workflow job for this annotation

GitHub Actions / build (MacOS, macos-latest, x86_64-apple-darwin)

use of deprecated method `winit::event_loop::EventLoop::<T>::create_window`: use `ActiveEventLoop::create_window` instead

let egui_ctx = egui::Context::default();
let viewport_id = egui_ctx.viewport_id();
let mut egui_winit = egui_winit::State::new(egui_ctx, viewport_id, &window, None, None);
let mut egui_winit = egui_winit::State::new(egui_ctx, viewport_id, &window, None, None, None);

let mut args = std::env::args();
let path_to_scene = args
Expand All @@ -818,7 +817,7 @@
let mut last_mouse_pos = [0i32; 2];

event_loop
.run(|event, target| {

Check warning on line 820 in examples/scene/main.rs

View workflow job for this annotation

GitHub Actions / build (Linux, ubuntu-latest, x86_64-unknown-linux-gnu)

use of deprecated method `winit::event_loop::EventLoop::<T>::run`: use `EventLoop::run_app` instead

Check warning on line 820 in examples/scene/main.rs

View workflow job for this annotation

GitHub Actions / build (Windows, windows-latest, x86_64-pc-windows-msvc)

use of deprecated method `winit::event_loop::EventLoop::<T>::run`: use `EventLoop::run_app` instead

Check warning on line 820 in examples/scene/main.rs

View workflow job for this annotation

GitHub Actions / build (MacOS, macos-latest, x86_64-apple-darwin)

use of deprecated method `winit::event_loop::EventLoop::<T>::run`: use `EventLoop::run_app` instead
example.choir.check_panic();
target.set_control_flow(winit::event_loop::ControlFlow::Poll);

Expand Down
9 changes: 4 additions & 5 deletions examples/vehicle/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -87,10 +87,9 @@
fn new(event_loop: &winit::event_loop::EventLoop<()>) -> Self {
log::info!("Initializing");

let window = winit::window::WindowBuilder::new()
.with_title("RayCraft")
.build(event_loop)
.unwrap();
let window_attributes = winit::window::Window::default_attributes().with_title("RayCraft");

let window = event_loop.create_window(window_attributes).unwrap();

Check warning on line 92 in examples/vehicle/main.rs

View workflow job for this annotation

GitHub Actions / build (Linux, ubuntu-latest, x86_64-unknown-linux-gnu)

use of deprecated method `winit::event_loop::EventLoop::<T>::create_window`: use `ActiveEventLoop::create_window` instead

Check warning on line 92 in examples/vehicle/main.rs

View workflow job for this annotation

GitHub Actions / build (Windows, windows-latest, x86_64-pc-windows-msvc)

use of deprecated method `winit::event_loop::EventLoop::<T>::create_window`: use `ActiveEventLoop::create_window` instead

let cam_config = config::Camera {
distance: 5.0,
Expand Down Expand Up @@ -306,7 +305,7 @@
let egui_context = egui::Context::default();
let egui_viewport_id = egui_context.viewport_id();
let egui_state =
egui_winit::State::new(egui_context, egui_viewport_id, &window, None, None);
egui_winit::State::new(egui_context, egui_viewport_id, &window, None, None, None);

Self {
engine,
Expand Down Expand Up @@ -657,7 +656,7 @@
let mut last_event = time::Instant::now();

event_loop
.run(|event, target| {

Check warning on line 659 in examples/vehicle/main.rs

View workflow job for this annotation

GitHub Actions / build (Linux, ubuntu-latest, x86_64-unknown-linux-gnu)

use of deprecated method `winit::event_loop::EventLoop::<T>::run`: use `EventLoop::run_app` instead

Check warning on line 659 in examples/vehicle/main.rs

View workflow job for this annotation

GitHub Actions / build (Windows, windows-latest, x86_64-pc-windows-msvc)

use of deprecated method `winit::event_loop::EventLoop::<T>::run`: use `EventLoop::run_app` instead
let _delta = last_event.elapsed().as_secs_f32();
last_event = time::Instant::now();

Expand Down
Loading