Skip to content

Commit

Permalink
Update to latest wgpu 0.14
Browse files Browse the repository at this point in the history
  • Loading branch information
jinleili committed Oct 6, 2022
1 parent 88e5395 commit 4e1557e
Show file tree
Hide file tree
Showing 7 changed files with 20 additions and 21 deletions.
3 changes: 0 additions & 3 deletions Android/app/src/main/java/name/jinleili/wgpu/ToggleButton.kt
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
package name.jinleili.wgpu

import androidx.compose.foundation.BorderStroke
import androidx.compose.foundation.background
import androidx.compose.foundation.border
import androidx.compose.foundation.layout.*
import androidx.compose.foundation.selection.toggleable
import androidx.compose.foundation.shape.RoundedCornerShape
Expand All @@ -11,7 +9,6 @@ import androidx.compose.material.MaterialTheme
import androidx.compose.material.Text
import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier
import androidx.compose.ui.draw.clip
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.unit.dp

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,8 @@ class WGPUSurfaceView : SurfaceView, SurfaceHolder.Callback2 {

constructor(context: Context) : super(context) {
}

constructor(context: Context, attrs: AttributeSet) : super(context, attrs) {
}

constructor(context: Context, attrs: AttributeSet, defStyle: Int) : super(
context,
attrs,
Expand Down
25 changes: 15 additions & 10 deletions Cargo.lock

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

3 changes: 2 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ log = "0.4"
noise = { version = "0.7", default-features = false }
pollster = "0.2"
rand = { version = "0.7.2" }
wgpu = { git = "https://github.com/gfx-rs/wgpu", rev = "c927e810" }
wgpu = "0.14"
# wgpu = { git = "https://github.com/gfx-rs/wgpu", rev = "c927e810" }
# wgpu = { git = "https://github.com/jinleili/wgpu", rev = "5ff54710" }
# wgpu = { path = "../../forks/wgpu/wgpu" }

Expand Down
4 changes: 2 additions & 2 deletions app-surface/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ version = "0.1.0"
crate-type = ["rlib"]

[profile.release]
# Rust 1.59+
strip = "all"

[features]
Expand All @@ -17,7 +16,8 @@ default = []
[dependencies]
log = "0.4"
pollster = "0.2"
wgpu = { git = "https://github.com/gfx-rs/wgpu", rev = "c927e810" }
wgpu = "0.14"
# wgpu = { git = "https://github.com/gfx-rs/wgpu", rev = "c927e810" }
# wgpu = { git = "https://github.com/jinleili/wgpu", rev = "5ff54710" }
# wgpu = { path = "../../../forks/wgpu/wgpu" }

Expand Down
2 changes: 0 additions & 2 deletions app-surface/src/app_surface.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ pub struct AppSurface {
pub scale_factor: f32,
pub sdq: crate::SurfaceDeviceQueue,
pub callback_to_app: Option<extern "C" fn(arg: i32)>,
pub temporary_directory: &'static str,
pub library_directory: &'static str,
}

Expand Down Expand Up @@ -40,7 +39,6 @@ impl AppSurface {
queue: Arc::new(queue),
},
callback_to_app: None,
temporary_directory: "",
library_directory: "",
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ fn main() {
.with_title("wgpu on Desktop");
let window = builder.build(&events_loop).unwrap();

let mut canvas = WgpuCanvas::new(AppSurface::new(window), 3);
let mut canvas = WgpuCanvas::new(AppSurface::new(window), 0);

let mut last_update_inst = Instant::now();
let target_frametime = Duration::from_secs_f64(1.0 / 60.0);
Expand Down

0 comments on commit 4e1557e

Please sign in to comment.