Skip to content

Commit

Permalink
Make demo renderer agnostic
Browse files Browse the repository at this point in the history
  • Loading branch information
tronical committed Nov 3, 2024
1 parent 9f1ba83 commit 7f9bcf8
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions examples/demo.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
use std::f32::consts::PI;

use femtovg::{
renderer::OpenGl, Align, Baseline, Canvas, Color, FillRule, FontId, ImageFlags, ImageId, LineCap, LineJoin, Paint,
Path, Renderer, Solidity,
Align, Baseline, Canvas, Color, FillRule, FontId, ImageFlags, ImageId, LineCap, LineJoin, Paint, Path, Renderer,
Solidity,
};
use instant::Instant;
use resource::resource;
Expand Down Expand Up @@ -36,8 +36,8 @@ struct Fonts {
icons: FontId,
}

fn run(
mut canvas: Canvas<OpenGl>,
fn run<R: Renderer + 'static>(
mut canvas: Canvas<R>,
el: EventLoop<()>,
#[cfg(not(target_arch = "wasm32"))] context: glutin::context::PossiblyCurrentContext,
#[cfg(not(target_arch = "wasm32"))] surface: glutin::surface::Surface<glutin::surface::WindowSurface>,
Expand Down

0 comments on commit 7f9bcf8

Please sign in to comment.