Skip to content

Commit

Permalink
Expose types required
Browse files Browse the repository at this point in the history
  • Loading branch information
Jasper-Bekkers committed Sep 11, 2023
1 parent d21322b commit 60916f1
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 9 deletions.
18 changes: 11 additions & 7 deletions src/engine.rs
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,9 @@ pub struct Recording {

#[derive(Clone, Copy)]
pub struct BufProxy {
size: u64,
id: Id,
name: &'static str,
pub size: u64,
pub id: Id,
pub name: &'static str,
}

#[derive(Copy, Clone, PartialEq, Eq)]
Expand All @@ -73,10 +73,10 @@ pub enum ImageFormat {

#[derive(Clone, Copy)]
pub struct ImageProxy {
width: u32,
height: u32,
format: ImageFormat,
id: Id,
pub width: u32,
pub height: u32,
pub format: ImageFormat,
pub id: Id,
}

#[derive(Clone, Copy)]
Expand Down Expand Up @@ -543,6 +543,10 @@ impl Recording {
ResourceProxy::Image(image) => self.free_image(image),
}
}

pub fn into_commands(self) -> Vec<Command> {
self.commands
}
}

impl BufProxy {
Expand Down
4 changes: 2 additions & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,14 @@ pub mod glyph;
#[cfg(feature = "wgpu")]
pub mod util;

use render::Render;
pub use render::Render;
pub use scene::{DrawGlyphs, Scene, SceneBuilder, SceneFragment};
#[cfg(feature = "wgpu")]
pub use util::block_on_wgpu;

#[cfg(feature = "wgpu")]
use engine::{Engine, ExternalResource};
use engine::Recording;
pub use engine::{Recording, Command, ImageProxy, BufProxy, ResourceProxy, ShaderId, Id, ImageFormat};
use shaders::FullShaders;

/// Temporary export, used in with_winit for stats
Expand Down

0 comments on commit 60916f1

Please sign in to comment.