From 56e79d522585243c3e43eae568ec37f74a6022ee Mon Sep 17 00:00:00 2001 From: Carter Anderson Date: Sat, 14 Mar 2020 12:56:37 -0700 Subject: [PATCH] reorganize texture and mesh --- bevy_derive/src/lib.rs | 2 +- examples/ui_bench.rs | 57 +++++++++++++++++++ src/app/app_builder.rs | 10 ++-- src/asset/mod.rs | 4 -- src/core/bytes.rs | 5 +- src/prelude.rs | 4 +- src/render/color.rs | 8 +-- .../assigned_meshes_draw_target.rs | 3 +- .../draw_targets/meshes_draw_target.rs | 3 +- .../draw_targets/ui_draw_target.rs | 3 +- src/{asset => render}/mesh.rs | 0 src/render/mod.rs | 3 +- src/render/render_resource/render_resource.rs | 5 +- .../mesh_resource_provider.rs | 3 +- .../ui_resource_provider.rs | 3 +- .../uniform_resource_provider.rs | 4 +- src/render/shader/uniform.rs | 8 ++- src/render/shader/uniforms/local_to_world.rs | 7 ++- src/render/texture/mod.rs | 2 + src/render/texture/sampler_descriptor.rs | 3 +- src/{asset => render/texture}/texture.rs | 0 src/render/texture/texture_descriptor.rs | 4 +- 22 files changed, 104 insertions(+), 37 deletions(-) create mode 100644 examples/ui_bench.rs rename src/{asset => render}/mesh.rs (100%) rename src/{asset => render/texture}/texture.rs (100%) diff --git a/bevy_derive/src/lib.rs b/bevy_derive/src/lib.rs index d492e7d635..ee4681baa6 100644 --- a/bevy_derive/src/lib.rs +++ b/bevy_derive/src/lib.rs @@ -167,7 +167,7 @@ pub fn derive_uniforms(input: TokenStream) -> TokenStream { } } - fn get_uniform_texture(&self, name: &str) -> Option> { + fn get_uniform_texture(&self, name: &str) -> Option> { use bevy::render::shader::GetTexture; match name { #(#texture_and_sampler_name_strings => self.#texture_and_sampler_name_idents.get_texture(),)* diff --git a/examples/ui_bench.rs b/examples/ui_bench.rs new file mode 100644 index 0000000000..5129c4e40a --- /dev/null +++ b/examples/ui_bench.rs @@ -0,0 +1,57 @@ +use bevy::prelude::*; + +fn main() { + AppBuilder::new() + .add_defaults() + .setup_world(setup) + .add_system(build_move_system()) + .add_system(bevy::diagnostics::build_fps_printer_system()) + .run(); +} + +fn build_move_system() -> Box { + SystemBuilder::new("Move") + .read_resource::