Skip to main content

Module gl_renderer

Module gl_renderer 

Source
Expand description

GL renderer infrastructure — tess2 bridge + GL command buffer.

This module provides the building blocks for hardware-accelerated rendering:

  • tess2_bridge — converts AGG-style polygon contours into GL triangle meshes using tess2-rust.

The higher-level [GlGfxCtx] (a drop-in parallel to crate::GfxCtx for GL targets) and the full [RenderTarget] abstraction are planned extensions.

§Reference

Modelled after the MatterCAD agg-sharp Graphics2DGpu / AARenderTesselator pipeline: shapes are tessellated to triangle meshes, then uploaded as VBOs and rendered with a simple colour-fill shader. Anti-aliased edge expansion (one-pixel outward quad + coverage ramp) follows AARenderTesselator.cs.

Re-exports§

pub use glyph_cache::GlyphCache;
pub use tess2_bridge::agg_path_to_contours;
pub use tess2_bridge::expand_aa_halo;
pub use tess2_bridge::tessellate_circle;
pub use tess2_bridge::tessellate_fill;
pub use tess2_bridge::tessellate_interior;
pub use tess2_bridge::tessellate_path;
pub use tess2_bridge::tessellate_path_aa;
pub use tess2_bridge::tessellate_rect;
pub use tess2_bridge::tessellate_rounded_rect;
pub use tess2_bridge::CachedTess;

Modules§

glyph_cache
Glyph vertex cache for the GL rendering path.
tess2_bridge
tess2 bridge — converts 2D polygon contours into GL triangle meshes.