From 31518e3dce8f34266471407b1d0a0a96b52f7f96 Mon Sep 17 00:00:00 2001 From: johnny-smitherson <127537716+johnny-smitherson@users.noreply.github.com> Date: Fri, 3 Nov 2023 21:01:39 +0000 Subject: [PATCH] fix compiler warnings & mention breaking in changelog --- CHANGELOG.md | 1 + src_testbed/debug_render.rs | 9 +-------- src_testbed/graphics.rs | 4 ++-- src_testbed/objects/node.rs | 6 +++--- src_testbed/testbed.rs | 8 ++------ 5 files changed, 9 insertions(+), 19 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 918c0dc6c..af6a3a2a8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ - Make `Wheel::friction_slip` public to customize the front friction applied to the vehicle controller’s wheels. - Add the `DebugRenderBackend::filter_object` predicate that can be implemented to apply custom filtering rules on the objects being rendered. +- **Breaking** Delete `RapierDebugRenderPlugin::depth_test` after switch to Bevy 0.11 Gizmos. ## v0.17.2 (26 Feb. 2023) ### Fix diff --git a/src_testbed/debug_render.rs b/src_testbed/debug_render.rs index 8e588db05..2d8776098 100644 --- a/src_testbed/debug_render.rs +++ b/src_testbed/debug_render.rs @@ -9,17 +9,10 @@ use rapier::pipeline::{ #[derive(Resource)] pub struct DebugRenderPipelineResource(pub DebugRenderPipeline); +#[derive(Default)] pub struct RapierDebugRenderPlugin { - depth_test: bool, } -impl Default for RapierDebugRenderPlugin { - fn default() -> Self { - Self { - depth_test: cfg!(feature = "dim3"), - } - } -} impl Plugin for RapierDebugRenderPlugin { fn build(&self, app: &mut App) { app.insert_resource(DebugRenderPipelineResource(DebugRenderPipeline::new( diff --git a/src_testbed/graphics.rs b/src_testbed/graphics.rs index 7c356c85b..70e27baff 100644 --- a/src_testbed/graphics.rs +++ b/src_testbed/graphics.rs @@ -13,8 +13,8 @@ use rapier::math::{Isometry, Real, Vector}; //#[cfg(feature = "dim2")] //use crate::objects::polyline::Polyline; // use crate::objects::mesh::Mesh; -use bevy_pbr::StandardMaterial; -use bevy_sprite::ColorMaterial; +// use bevy_pbr::StandardMaterial; +// use bevy_sprite::ColorMaterial; use rand::{Rng, SeedableRng}; use rand_pcg::Pcg32; use std::collections::HashMap; diff --git a/src_testbed/objects/node.rs b/src_testbed/objects/node.rs index 3214a0f89..da14a8071 100644 --- a/src_testbed/objects/node.rs +++ b/src_testbed/objects/node.rs @@ -7,9 +7,9 @@ use std::collections::HashMap; use bevy::render::render_resource::PrimitiveTopology; use bevy_pbr::wireframe::Wireframe; -use bevy_pbr::PbrBundle; -use bevy_pbr::StandardMaterial; -use bevy_sprite::ColorMaterial; +// use bevy_pbr::PbrBundle; +// use bevy_pbr::StandardMaterial; +// use bevy_sprite::ColorMaterial; use rapier::geometry::{ColliderHandle, ColliderSet, Shape, ShapeType}; #[cfg(feature = "dim3")] diff --git a/src_testbed/testbed.rs b/src_testbed/testbed.rs index 60ea91550..2c83d1f11 100644 --- a/src_testbed/testbed.rs +++ b/src_testbed/testbed.rs @@ -5,7 +5,7 @@ use bevy::prelude::*; use crate::physics::{PhysicsEvents, PhysicsSnapshot, PhysicsState}; use crate::plugin::TestbedPlugin; -use crate::{debug_render, ui}; +use crate::ui; use crate::{graphics::GraphicsManager, harness::RunState}; use na::{self, Point2, Point3, Vector3}; @@ -28,14 +28,10 @@ use crate::harness::Harness; #[cfg(all(feature = "dim3", feature = "other-backends"))] use crate::physx_backend::PhysxWorld; use bevy::render::camera::Camera; -use bevy_core_pipeline::prelude::Camera2dBundle; -use bevy_core_pipeline::prelude::Camera3dBundle; use bevy_core_pipeline::prelude::ClearColor; use bevy_egui::EguiContexts; use bevy_pbr::wireframe::WireframePlugin; use bevy_pbr::AmbientLight; -use bevy_pbr::DirectionalLight; -use bevy_pbr::DirectionalLightBundle; #[cfg(feature = "dim2")] use crate::camera2d::{OrbitCamera, OrbitCameraPlugin}; @@ -1005,7 +1001,7 @@ fn draw_contacts(_nf: &NarrowPhase, _colliders: &ColliderSet) { #[cfg(feature = "dim3")] fn setup_graphics_environment(mut commands: Commands) { - const HALF_SIZE: f32 = 100.0; + // const HALF_SIZE: f32 = 100.0; commands.spawn(DirectionalLightBundle { directional_light: DirectionalLight {