Skip to content

Commit

Permalink
Make egui_wgpu::renderer a private module
Browse files Browse the repository at this point in the history
All its contents is exported to the top-level
  • Loading branch information
emilk committed Feb 5, 2024
1 parent 1858167 commit 9774527
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
8 changes: 4 additions & 4 deletions crates/egui-wgpu/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
//! If you're targeting WebGL you also need to turn on the
//! `webgl` feature of the `wgpu` crate:
//!
//! ```ignore
//! ```toml
//! # Enable both WebGL and WebGPU backends on web.
//! wgpu = { version = "*", features = ["webgpu", "webgl"] }
//! ```
Expand All @@ -21,9 +21,9 @@
pub use wgpu;

/// Low-level painting of [`egui`](https://github.com/emilk/egui) on [`wgpu`].
pub mod renderer;
pub use renderer::Renderer;
pub use renderer::{Callback, CallbackResources, CallbackTrait};
mod renderer;

pub use renderer::*;

/// Module for painting [`egui`](https://github.com/emilk/egui) with [`wgpu`] on [`winit`].
#[cfg(feature = "winit")]
Expand Down
1 change: 0 additions & 1 deletion crates/egui-wgpu/src/renderer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ use std::{borrow::Cow, num::NonZeroU64, ops::Range};

use epaint::{ahash::HashMap, emath::NumExt, PaintCallbackInfo, Primitive, Vertex};

use wgpu;
use wgpu::util::DeviceExt as _;

/// You can use this for storage when implementing [`CallbackTrait`].
Expand Down
4 changes: 2 additions & 2 deletions crates/egui_demo_app/src/apps/custom3d_wgpu.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use std::num::NonZeroU64;

use eframe::{
egui_wgpu::wgpu::util::DeviceExt,
egui_wgpu::{self, renderer::ScreenDescriptor, wgpu},
egui_wgpu::{self, wgpu},
};

pub struct Custom3d {
Expand Down Expand Up @@ -148,7 +148,7 @@ impl egui_wgpu::CallbackTrait for CustomTriangleCallback {
&self,
device: &wgpu::Device,
queue: &wgpu::Queue,
_screen_descriptor: &ScreenDescriptor,
_screen_descriptor: &egui_wgpu::ScreenDescriptor,
_egui_encoder: &mut wgpu::CommandEncoder,
resources: &mut egui_wgpu::CallbackResources,
) -> Vec<wgpu::CommandBuffer> {
Expand Down

0 comments on commit 9774527

Please sign in to comment.