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
//! GPU-accelerated rendering with EGL/OpenGL 4.6.
//!
//! `optic-render` manages the full graphics pipeline: context creation (headless or
//! windowed), asset loading (meshes, textures, shaders), instanced drawing, off-screen
//! canvas (framebuffer objects), and 2D/3D camera transforms.
//!
//! # Architecture
//!
//! | Layer | Module | Role |
//! |-------|--------|------|
//! | Context | [`RenderContext`] | EGL display, surfaces, vsync |
//! | Backend | [`GL`] | Thin wrappers around raw OpenGL calls |
//! | Device | [`GPU`] | Stateful renderer with fallback assets |
//! | Assets | [`asset`] | Load/save/cache meshes, textures, shaders from disk |
//! | Handles | [`handles`] | Runtime GPU handles: [`MeshHandle`], [`Shader`], [`Texture2D`], [`Canvas`], [`InstanceBuffer`] ... |
//! | Camera | [`Camera`] | Perspective/orthographic camera with fly-through controls |
//! | Transforms | [`Transform2D`], [`Transform3D`], [`CamTransform`] | Position / rotation / scale helpers |
//!
//! # Getting started
//!
//! ```ignore
//! use optic_render::GPU;
//!
//! let gpu = GPU::new_headless()?;
//! println!("{}", gpu.version());
//! ```
//!
//! # Feature flags
//!
//! This crate is always compiled with all features. The parent `optic` crate controls
//! which sub-crates are included via its own feature flags.
pub use *;
pub use *;
pub use *;
pub use *;
pub use *;
pub use *;