1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
pub mod bind;
pub mod color;
mod context;
mod draw;
mod format;
pub mod group;
pub mod instance;
pub mod layer;
pub mod mesh;
mod shader;
mod state;
pub mod texture;
pub mod uniform;
pub mod vertex;

#[cfg(feature = "winit")]
mod el;
#[cfg(feature = "winit")]
mod element;
#[cfg(feature = "winit")]
mod time;
#[cfg(feature = "winit")]
mod update;
#[cfg(feature = "winit")]
pub mod window;

pub mod prelude {
    //! The dunge prelude.

    pub use crate::{
        context::Context, mesh::MeshData, sl, texture::TextureData, types, Format, Frame, Group,
        Instance, Options, Vertex,
    };

    #[cfg(feature = "winit")]
    pub use crate::el::{Control, KeyCode, Then};
}

pub use {
    crate::{
        context::{context, Context, FailedMakeContext},
        draw::{draw, Draw},
        format::Format,
        state::{AsTarget, Frame, Options, RenderBuffer, Target},
    },
    dunge_macros::{Group, Instance, Vertex},
    dunge_shader::{group::Group, instance::Instance, sl, types, vertex::Vertex},
    glam,
};

#[cfg(all(feature = "winit", not(target_arch = "wasm32")))]
pub use crate::window::window;

#[cfg(all(feature = "winit", target_arch = "wasm32"))]
pub use crate::window::from_element;

#[cfg(feature = "winit")]
pub use crate::{
    el::{Buttons, Control, Flow, Key, KeyCode, LoopError, Mouse, MouseButton, SmolStr, Then},
    update::{update, update_with_event, update_with_state, Update},
};