Skip to content

Commit

Permalink
Merge pull request #1202 from hannobraun/ui
Browse files Browse the repository at this point in the history
Remove old UI
  • Loading branch information
hannobraun authored Oct 11, 2022
2 parents 3de8030 + 3641df4 commit e51a3fc
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 175 deletions.
147 changes: 0 additions & 147 deletions crates/fj-viewer/src/graphics/config_ui.rs

This file was deleted.

1 change: 0 additions & 1 deletion crates/fj-viewer/src/graphics/mod.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
//! Rendering primitives, routines, and structures.
mod config_ui;
mod draw_config;
mod drawables;
mod geometries;
Expand Down
30 changes: 3 additions & 27 deletions crates/fj-viewer/src/graphics/renderer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,16 @@ use crate::{
};

use super::{
config_ui::ConfigUi, draw_config::DrawConfig, drawables::Drawables,
geometries::Geometries, pipelines::Pipelines, transform::Transform,
uniforms::Uniforms, vertices::Vertices, DEPTH_FORMAT,
draw_config::DrawConfig, drawables::Drawables, geometries::Geometries,
pipelines::Pipelines, transform::Transform, uniforms::Uniforms,
vertices::Vertices, DEPTH_FORMAT,
};

#[derive(Default)]
struct EguiOptionsState {
show_trace: bool,
show_layout_debug_on_hover: bool,
show_debug_text_example: bool,
show_original_ui: bool,
show_settings_ui: bool,
show_inspection_ui: bool,
}
Expand Down Expand Up @@ -59,8 +58,6 @@ pub struct Renderer {
geometries: Geometries,
pipelines: Pipelines,

config_ui: ConfigUi,

/// State required for integration with `egui`.
pub egui: EguiState,
}
Expand Down Expand Up @@ -232,8 +229,6 @@ impl Renderer {
let pipelines =
Pipelines::new(&device, &bind_group_layout, color_format);

let config_ui = ConfigUi::new(&device, color_format)?;

//
// Note: We need to hold on to this otherwise (from my memory)
// it causes the egui font texture to get dropped after
Expand Down Expand Up @@ -267,8 +262,6 @@ impl Renderer {
geometries,
pipelines,

config_ui,

egui: EguiState {
context: egui_context,
winit_state: egui_winit_state,
Expand Down Expand Up @@ -380,19 +373,6 @@ impl Renderer {
}
}

if self.egui.options.show_original_ui {
self.config_ui
.draw(
&self.device,
&mut encoder,
&color_view,
&self.surface_config,
&self.geometries.aabb,
config,
)
.map_err(DrawError::Text)?;
}

//
// NOTE: The following comment was written for the original
// proof-of-concept which targeted older versions of
Expand Down Expand Up @@ -461,10 +441,6 @@ impl Renderer {
.on_disabled_hover_text(
"Rendering device does not have line rendering feature support"
);
ui.checkbox(
&mut self.egui.options.show_original_ui,
"Render original UI",
);
ui.add_space(16.0);
ui.strong(get_bbox_size_text(&self.geometries.aabb));
});
Expand Down

0 comments on commit e51a3fc

Please sign in to comment.