agg_gui/gl_renderer/mod.rs
1//! GL renderer infrastructure — tess2 bridge + GL command buffer.
2//!
3//! This module provides the building blocks for hardware-accelerated rendering:
4//!
5//! - [`tess2_bridge`] — converts AGG-style polygon contours into GL triangle
6//! meshes using tess2-rust.
7//!
8//! The higher-level [`GlGfxCtx`] (a drop-in parallel to [`crate::GfxCtx`] for
9//! GL targets) and the full [`RenderTarget`] abstraction are planned extensions.
10//!
11//! # Reference
12//!
13//! Modelled after the MatterCAD agg-sharp `Graphics2DGpu` / `AARenderTesselator`
14//! pipeline: shapes are tessellated to triangle meshes, then uploaded as VBOs
15//! and rendered with a simple colour-fill shader. Anti-aliased edge expansion
16//! (one-pixel outward quad + coverage ramp) follows `AARenderTesselator.cs`.
17
18pub mod aa_texture_mesh;
19pub mod glyph_cache;
20pub mod tess2_bridge;
21
22pub use aa_texture_mesh::{tessellate_path_aa_texture, AaTexVertex};
23pub use glyph_cache::GlyphCache;
24pub use tess2_bridge::{
25 agg_path_to_contours, expand_aa_halo, install_tess_panic_logger, tessellate_circle,
26 tessellate_fill, tessellate_interior, tessellate_path, tessellate_path_aa, tessellate_rect,
27 tessellate_rounded_rect, CachedTess,
28};