Skip to content

Commit

Permalink
Use the correct eframe options for our custom viewer examples (#8616)
Browse files Browse the repository at this point in the history
  • Loading branch information
emilk authored Jan 8, 2025
1 parent c2574fc commit 0faf4a6
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
10 changes: 5 additions & 5 deletions examples/rust/custom_callback/src/viewer.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use custom_callback::{comms::viewer::ControlViewer, panel::Control};

use rerun::external::{eframe, egui, re_log, re_memory, re_sdk_comms, re_viewer};
use rerun::external::{eframe, re_log, re_memory, re_sdk_comms, re_viewer};

use std::net::Ipv4Addr;

Expand Down Expand Up @@ -42,10 +42,10 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
});

// Then we start the Rerun viewer
let native_options = eframe::NativeOptions {
viewport: egui::ViewportBuilder::default().with_app_id("rerun_custom_callback_example"),
..re_viewer::native::eframe_options(None)
};
let mut native_options = re_viewer::native::eframe_options(None);
native_options.viewport = native_options
.viewport
.with_app_id("rerun_custom_callback_example");

// This is used for analytics, if the `analytics` feature is on in `Cargo.toml`
let app_env = re_viewer::AppEnvironment::Custom("My Custom Callback".to_owned());
Expand Down
8 changes: 4 additions & 4 deletions examples/rust/extend_viewer_ui/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,10 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
Default::default(),
)?;

let native_options = eframe::NativeOptions {
viewport: egui::ViewportBuilder::default().with_app_id("rerun_extend_viewer_ui_example"),
..re_viewer::native::eframe_options(None)
};
let mut native_options = re_viewer::native::eframe_options(None);
native_options.viewport = native_options
.viewport
.with_app_id("rerun_extend_viewer_ui_example");

let startup_options = re_viewer::StartupOptions::default();

Expand Down

0 comments on commit 0faf4a6

Please sign in to comment.