Feat: add hidden mode and new documentation
Some checks failed
Deploy Website / deploy (push) Failing after 29s

This commit is contained in:
2026-02-26 12:31:56 +01:00
parent 8af17c01d8
commit b728b38d6e
95 changed files with 1055 additions and 286 deletions

View File

@@ -1,3 +1,5 @@
//! Glow-based OpenGL renderer for egui inside a baseview window.
use baseview::{PhySize, Window};
use egui::FullOutput;
use egui_glow::Painter;
@@ -5,6 +7,7 @@ use std::sync::Arc;
use super::OpenGlError;
/// OpenGL rendering options for the egui painter.
#[derive(Debug, Clone)]
pub struct GraphicsConfig {
/// Controls whether to apply dithering to minimize banding artifacts.
@@ -32,12 +35,14 @@ impl Default for GraphicsConfig {
}
}
/// Manages glow context and egui painter lifecycle.
pub struct Renderer {
glow_context: Arc<egui_glow::glow::Context>,
painter: Painter,
}
impl Renderer {
/// Create a renderer from the baseview window's GL context.
pub fn new(window: &Window, config: GraphicsConfig) -> Result<Self, OpenGlError> {
let context = window.gl_context().ok_or(OpenGlError::NoContext)?;
unsafe {
@@ -71,6 +76,7 @@ impl Renderer {
self.painter.max_texture_side()
}
/// Render a completed egui frame to the window.
pub fn render(
&mut self,
window: &Window,