Skip to content

Commit

Permalink
goofing around very wip
Browse files Browse the repository at this point in the history
  • Loading branch information
Friz64 committed Jul 14, 2024
1 parent 6f16ea4 commit ddffa2b
Show file tree
Hide file tree
Showing 8 changed files with 162 additions and 101 deletions.
9 changes: 9 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ members = [
"wgpu-macros",
"wgpu-types",
"wgpu",
"fuckedupstatic",
]
exclude = []
default-members = [
Expand Down Expand Up @@ -70,6 +71,7 @@ path = "./naga"
version = "0.20.0"

[workspace.dependencies]
fuckedupstatic = { path = "fuckedupstatic" }
anyhow = "1.0.86"
arrayvec = "0.7"
bincode = "1"
Expand Down
1 change: 1 addition & 0 deletions examples/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ webgl = ["wgpu/webgl"]
webgpu = ["wgpu/webgpu"]

[dependencies]
fuckedupstatic.workspace = true
bytemuck.workspace = true
cfg-if.workspace = true
encase = { workspace = true, features = ["glam"] }
Expand Down
6 changes: 5 additions & 1 deletion examples/src/framework.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use std::sync::Arc;

use wgpu::{Instance, Surface};
use wgpu::{rwh::HasDisplayHandle, Instance, Surface};
use winit::{
dpi::PhysicalSize,
event::{Event, KeyEvent, StartCause, WindowEvent},
Expand Down Expand Up @@ -114,6 +114,9 @@ impl EventLoopWrapper {
}
builder = builder.with_title(title);
let window = Arc::new(builder.build(&event_loop).unwrap());
unsafe {
FUCKED_UP = Some(window.display_handle().unwrap().as_raw());
}

Self { event_loop, window }
}
Expand Down Expand Up @@ -510,6 +513,7 @@ pub fn parse_url_query_string<'a>(query: &'a str, search_key: &str) -> Option<&'
None
}

use fuckedupstatic::FUCKED_UP;
#[cfg(test)]
pub use wgpu_test::image::ComparisonType;

Expand Down
7 changes: 7 additions & 0 deletions fuckedupstatic/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[package]
name = "fuckedupstatic"
version = "0.20.0"
edition = "2021"

[dependencies]
raw-window-handle = "0.6"
3 changes: 3 additions & 0 deletions fuckedupstatic/src/lib.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
use raw_window_handle::RawDisplayHandle;

pub static mut FUCKED_UP: Option<RawDisplayHandle> = None;
1 change: 1 addition & 0 deletions wgpu-hal/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ parking_lot = ">=0.11, <0.13"
profiling = { version = "1", default-features = false }
raw-window-handle = "0.6"
thiserror = "1"
fuckedupstatic.workspace = true
once_cell = "1.19.0"

# backends common
Expand Down
Loading

0 comments on commit ddffa2b

Please sign in to comment.